Template/Container/Worksheet.pm

filter: Statementstmt 33.3% 11 / 33 Branchbran 0.0% 0 / 14 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 2 totaltotal 25.0% 15 / 60 CC 9 SCAR 40.7
CC
9
Cov
22%
render
90.0
exit_scope
2.0
BEGIN
1.0
CRAP 58.3
« Template/Element/Cell.pm ↑ Summary Template/Iterator.pm »
1 package Excel::Template::Container::Worksheet;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 BEGIN {
6 1 ▶ use vars qw(@ISA);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶ @ISA = qw(Excel::Template::Container);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶ use Excel::Template::Container;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 }
11  
12 0 ▶sub exit_scope { $_[1]->active_worksheet(undef) }
Subroutine exit_scope: not called CC=1 SCAR=6.9
Pod undocumented
13  
14 sub render {
15 0 ▶ my $self = shift;
Subroutine render: not called CC=9 SCAR=45.0
Pod undocumented
16 0 my ($context) = @_;
17  
18 0 my $worksheet = $context->new_worksheet($self);
19  
20 0 my $password = $context->get( $self, 'PROTECT' );
21 0 ▶ if ( defined $password ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $password) 0 0 0
22 0 $worksheet->protect($password);
23 }
24  
25 0 ▶ $worksheet->keep_leading_zeros(1)
Branch: 1 branch
BranchTrueFalseTotal
if $context->mark("keep_leading_zeros") 0 0 0
26 if $context->mark('keep_leading_zeros');
27  
28 0 ▶ if ( $context->get( $self, 'LANDSCAPE' ) && !$self->{PORTRAIT} ) {
Branch: 2 branches
BranchTrueFalseTotal
if ($context->get($self, 'LANDSCAPE') and not $self->{'PORTRAIT'}) { } 0 0 0
elsif ($context->get($self, 'PORTRAIT')) { } 0 0 0
Condition0%0/3
$context->get($self, "LANDSCAPE") and not $self->{"PORTRAIT"}
!ll&&!rl&&r
000
MC/DC0%0/2
$context->get($self, "LANDSCAPE") and not $self->{"PORTRAIT"}
$context->get($self, "LANDSCAPE") not $self->{"PORTRAIT"}
Truth table0%0/3
A and not(B)
A= $context->get($self, "LANDSCAPE")B= not $self->{"PORTRAIT"}
ABresult
0X0
100
111
29 0 $worksheet->set_landscape;
30 } elsif ( $context->get( $self, 'PORTRAIT' ) ) {
31 0 $worksheet->set_portrait;
32 }
33  
34
35 0 my $hide_gridlines = $context->get( $self, 'HIDE_GRIDLINES');
36
37 0 ▶ if ( defined $hide_gridlines ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $hide_gridlines) 0 0 0
38 0 $worksheet->hide_gridlines( $hide_gridlines );
39 }
40  
41 0 my $autofilter = $context->get( $self, "AUTOFILTER");
42 0 ▶ if ( defined $autofilter ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $autofilter) 0 0 0
43 0 ▶ if ($autofilter =~ /^\D/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($autofilter =~ /^\D/) { } 0 0 0
44 0 $worksheet->autofilter($autofilter);
45 }else{
46 0 $autofilter =~ s/ //g;
47 0 my ($row1, $col1, $row2, $col2) = split(',',$autofilter);
48 0 $worksheet->autofilter($row1, $col1, $row2, $col2);
49 }
50 }
51  
52 0 return $self->SUPER::render($context);
53 }
54  
55 1 1;
56 __END__
« Template/Element/Cell.pm ↑ Summary Template/Iterator.pm »