EP/Install.pm

filter: Statementstmt 50.0% 10 / 20 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 2 totaltotal 32.5% 13 / 40 CC 5 SCAR 23.6
CC
5
Cov
33%
Save
20.0
new
6.0
BEGIN
1.0
CRAP 10.6
« EP/Request/CGI.pm ↑ Summary EP/Formatter/HTML.pm »
1 # -*- perl -*-
2
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4
5 1 ▶use Data::Dumper ();
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Symbol ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7
8 package XML::EP::Install;
9
10 1 $XML::EP::Install::VERSION = '0.01';
11
12 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
13 0 my $proto = shift;
14 0 ▶ my $self = [ (@_ == 1) ? @{shift()} : @_ ];
Branch: 1 branch
BranchTrueFalseTotal
@_ == 1 ? : 0 0 0
15 0 bless($self, "XML::EP::Install");
16 }
17
18 0 ▶sub Save {
Subroutine Save: not called CC=4 SCAR=30.0
Pod undocumented
19 0 my $self = shift; my $file = shift;
20 0 my $array = [ @$self ];
21 0 my $dump = Data::Dumper->new([$array])->Terse(1)->Indent(1)->Dump();
22 0 my $fh = Symbol::gensym();
23 0 ▶ (open($fh, ">$file") and
Branch: 1 branch
BranchTrueFalseTotal
open $fh, ">$file" and print $fh "package XML::EP::Config;\n\$XML::EP::Config::config = $dump\n" and close $fh or die "Failed to create config file ${file}: $!" 0 0 0
Condition0%0/6
open $fh, ">$file" and print $fh "package XML::EP::Config;\n\$XML::EP::Config::config = $dump\n" and close $fh
!ll&&!rl&&r
000
open $fh, ">$file" and print $fh "package XML::EP::Config;\n\$XML::EP::Config::config = $dump\n"
!ll&&!rl&&r
000
MC/DC0%0/3
open $fh, ">$file" and print $fh "package XML::EP::Config;\n\$XML::EP::Config::config = $dump\n" and close $fh
open $fh, ">$file" print $fh "package XML::EP::Config;\n\$XML::EP::Config::config = $dump\n" close $fh
Truth table0%0/4
A and B and C
A= open $fh, ">$file"B= print $fh "package XML::EP::Config;\n\$XML::EP::Config::config = $dump\n"C= close $fh
ABCresult
0XX0
10X0
1100
1111
24 (print $fh "package XML::EP::Config;\n\$XML::EP::Config::config = $dump\n") and
25 close($fh)) || die "Failed to create config file $file: $!";
26 }
« EP/Request/CGI.pm ↑ Summary EP/Formatter/HTML.pm »