Data-Unixish
    
    
  
  
  
view release on metacpan or search on metacpan
1.32    2013-04-18  Released-By: SHARYANTO
        - No functional changes. A couple of fixes for Data::Unixish::List and
          reenable t/wrap.t.
1.31    2013-04-14  Released-By: SHARYANTO
        - Add dux function: yes (test output streaming, App::dux 1.32+).
1.30    2013-04-12  Released-By: SHARYANTO
        - Add dux function: wc.
1.29    2013-04-11  Released-By: SHARYANTO
        - Add Data::Unixish::List to simplify using dux function in Perl for
    The *duxc functions will call the callback repeatedly with every output
    item.
    The *duxf functions returns filehandle immediately. A child process is
    forked, and dux function is run in the child process. You read output as
    lines from the returned filehandle. (Currently not yet supported on
    Windows due to no support for open '-|').
    The *duxl functions returns result as list. It can be evaluated in
    scalar to return only the first element of the list. However, the whole
    list will be calculated first. Use *duxf for streaming interface.
  cduxa($func, $icallback) => ARRAYREF
  cduxc($func, $icallback, $ocallback)
  cduxf($func, $icallback) => FILEHANDLE
  cduxl($func, $icallback) => LIST (OR SCALAR)
    The "cdux*" functions accepts a callback ($icallback) to get input
    elements from. Input callback function should return a list of one or
    more elements, or an empty list to signal end of stream.
    An example:
lib/Data/Unixish.pm view on Meta::CPAN
The C<*duxc> functions will call the callback repeatedly with every output item.
The C<*duxf> functions returns filehandle immediately. A child process is
forked, and dux function is run in the child process. You read output as lines
from the returned filehandle. (Currently not yet supported on Windows due to no
support for open '-|').
The C<*duxl> functions returns result as list. It can be evaluated in scalar to
return only the first element of the list. However, the whole list will be
calculated first. Use C<*duxf> for streaming interface.
=head2 cduxa($func, $icallback) => ARRAYREF
=head2 cduxc($func, $icallback, $ocallback)
=head2 cduxf($func, $icallback) => FILEHANDLE
=head2 cduxl($func, $icallback) => LIST (OR SCALAR)
The C<cdux*> functions accepts a callback (C<$icallback>) to get input elements
lib/Data/Unixish/Util.pm view on Meta::CPAN
our $DATE = '2025-02-24'; # DATE
our $DIST = 'Data-Unixish'; # DIST
our $VERSION = '1.574'; # VERSION
our @EXPORT_OK = qw(%common_args filter_args);
our %common_args = (
    in  => {
        summary => 'Input stream (e.g. array or filehandle)',
        schema  => ['array'],
        #cmdline_src => 'stdin_or_files', # not until pericmd-base supports streaming
        #stream => 1,
    },
    out => {
        summary => 'Output stream (e.g. array or filehandle)',
        schema  => 'any', # TODO: any* => of => [stream*, array*]
        #req => 1,
    },
);
sub filter_args {
( run in 0.400 second using v1.01-cache-2.11-cpan-5dc5da66d9d )