bin/pfcat

filter: Statementstmt 92.8% 13 / 14 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 85.0% 17 / 20 CC 1 SCAR 0.0
CC
1
Cov
83%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« bin/stdpods ↑ Summary bin/podtoc »
1 #!/usr/bin/env perl
2 # pfcat - cat out function definitions from perlfunc
3 #
4 # this is a command of its own so it can find the right version
5  
6 # ------ pragmas
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 our $VERSION = '2.0.0';
11  
12 # ------ define variable
13 1 my @options = (); # list of podgrep options
14  
15 1 @options = ();
16 1 ▶while ($ARGV[0] =~ /^-/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ARGV[0] =~ /^-/) 0 1 1
17 0 push @options, shift @ARGV;
18 }
19  
20 1 ▶die "usage: $0 function\n" unless @ARGV;
Branch: 1 branch
BranchTrueFalseTotal
unless @ARGV 0 1 1
21  
22 1 system "$^X -S podgrep -h @options '@ARGV' `$^X -S podpath perlfunc`";
23 1 exit ($? != 0);
24  
25 __END__
« bin/stdpods ↑ Summary bin/podtoc »