bin/ud

filter: Statementstmt 94.4% 34 / 36 Branchbran 58.3% 7 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod n/a totaltotal 87.5% 49 / 56 CC 1 SCAR 0.0
CC
1
Cov
85%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Text/UpsideDown.pm ↑ Summary
1 #!/usr/bin/env perl
2 2 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # PODNAME: ud
7 # ABSTRACT: print your text Upside Down
8 2 our $VERSION = '1.22'; # VERSION
9  
10 2 ▶use Text::UpsideDown qw(upside_down);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 2 ▶use Getopt::Long qw(GetOptions);
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 ▶use Pod::Usage qw(pod2usage);
Subroutine BEGIN: called CC=1 SCAR=0.0
13 2 ▶use open qw(:std :encoding(UTF-8));
Subroutine BEGIN: called CC=1 SCAR=0.0
14 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16  
17 2 my %opts = ();
18 2 ▶GetOptions(\%opts,
Branch: 1 branch
BranchTrueFalseTotal
&GetOptions(\%opts, "help", "version") or pod2usage("-verbose", 2, "-output", *STDERR) 2 0 2
19 'help',
20 'version',
21 ) or pod2usage(-verbose => 2, -output => *STDERR);
22 2 ▶pod2usage(-verbose => 2) if $opts{help};
Branch: 1 branch
BranchTrueFalseTotal
if $opts{"help"} 0 2 2
23 2 ▶if ($opts{version}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($opts{"version"}) 0 2 2
24 0 ▶ print __PACKAGE__->VERSION ? __PACKAGE__->VERSION : 'dev';
Branch: 1 branch
BranchTrueFalseTotal
__PACKAGE__->VERSION ? : 0 0 0
25 0 exit;
26 }
27  
28 2 ▶if (@ARGV) {
Branch: 1 branch
BranchTrueFalseTotal
if (@ARGV) { } 1 1 2
29 1 print upside_down("@ARGV\n"), "\n";
30 }
31 else {
32 1 my $text = '';
33 1 ▶ while (<STDIN>) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined($_ = readline STDIN)) 1 1 2
34 1 $text .= $_;
35 }
36 1 print upside_down($text), "\n";
37 }
38  
39 __END__
« lib/Text/UpsideDown.pm ↑ Summary