File Coverage

blib/lib/Data/Unixish/Util.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 1 1 100.0
total 14 14 100.0


line stmt bran cond sub pod time code
1             package Data::Unixish::Util;
2              
3             our $DATE = '2019-10-26'; # DATE
4             our $VERSION = '1.571'; # VERSION
5              
6 44     44   759 use strict;
  44         95  
  44         1251  
7 44     44   268 use warnings;
  44         96  
  44         9737  
8              
9             require Exporter;
10             our @ISA = qw(Exporter);
11             our @EXPORT_OK = qw(%common_args filter_args);
12              
13             our %common_args = (
14             in => {
15             summary => 'Input stream (e.g. array or filehandle)',
16             schema => ['array'],
17             #cmdline_src => 'stdin_or_files', # not until pericmd-base supports streaming
18             #stream => 1,
19             },
20             out => {
21             summary => 'Output stream (e.g. array or filehandle)',
22             schema => 'any', # TODO: any* => of => [stream*, array*]
23             #req => 1,
24             },
25             );
26              
27             sub filter_args {
28 2     2 1 84 my $hash = shift;
29 2         8 return { map {$_=>$hash->{$_}} grep {/\A\w+\z/} keys %$hash };
  4         20  
  6         24  
30             }
31              
32             1;
33             # ABSTRACT: Utility routines
34              
35             __END__