Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
AnyEvent::Subprocess::User(Contributed Perl DocumAnyEvent::Subprocess::Easy(3)

NAME
       AnyEvent::Subprocess::Easy - wrappers around AnyEvent::Subprocess to
       save typing in simple cases

VERSION
       version 1.102912

SYNOPSIS
	   use AnyEvent::Subprocess::Easy qw(qx_nonblock);

	   my $date = qx_nonblock('date')->recv;

DESCRIPTION
       I was writing some examples and noticed some patterns that came up
       again and again,	so I converted them to functions.  These are opaque
       and non-customizeable, but might	be helpful if you want to do something
       common without a	lot of typing.	If they	don't work quite the way you
       want, it	is not too hard	to use AnyEvent::Subprocess directly.

EXPORTS
       We use Sub::Exporter here, so you can customize the exports as
       appropriate.

   qx_nonblock(	$cmdline | @cmdline )
       "qx_nonblock" works like	qx, except that	it returns a condvar that you
       "recv" on to get	the captured stdout.  The "recv" will throw an
       exception if the	process	you run	doesn't	exit cleanly.

       You can pass in one string for the shell	to interpret (like "exec"), or
       you can pass in a list of arguments (passed directly to "exec").	 You
       can also	pass in	a coderef if you like; it will be called with an
       undefined number	of arguments in	the child process (and should "exit 0"
       if it is	successful).

BUGS
       Not enough "easy" stuff here yet.  Please contribute your common
       patterns!

SEE ALSO
       AnyEvent::Subprocess

AUTHOR
       Jonathan	Rockway	<jrockway@cpan.org>

COPYRIGHT AND LICENSE
       This software is	copyright (c) 2011 by Jonathan Rockway.

       This is free software; you can redistribute it and/or modify it under
       the same	terms as the Perl 5 programming	language system	itself.

perl v5.32.0			  2011-02-25	 AnyEvent::Subprocess::Easy(3)

NAME | VERSION | SYNOPSIS | DESCRIPTION | EXPORTS | BUGS | SEE ALSO | AUTHOR | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=AnyEvent::Subprocess::Easy&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help