Component/DataSection.pm

filter: Statementstmt 58.3% 14 / 24 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 4 / 8 Podpod 100% 3 / 3 totaltotal 56.7% 21 / 37 CC 2 SCAR 8.9
CC
2
Cov
54%
merge_data_section_into
6.0
__ANON__
2.0
get_data_section
2.0
CRAP 2.4
« Plugin/Web/Request.pm ↑ Summary Plugin/Web.pm »
1 package Blosxom::Component::DataSection;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use parent 'Blosxom::Component';
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Data::Section::Simple;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 __PACKAGE__->mk_accessors(
8 0 ▶ data_section => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
9 0 my $class = shift;
10 0 Data::Section::Simple->new($class)->get_data_section;
11 },
12 1 );
13  
14 0 ▶sub get_data_section { $_[0]->data_section->{$_[1]} }
Subroutine get_data_section: not called CC=1 SCAR=6.9
Pod documented
15 0 ▶sub data_section_names { keys %{ $_[0]->data_section } }
Subroutine data_section_names: not called CC=1 SCAR=6.9
Pod documented
16  
17 0 ▶sub merge_data_section_into {
Subroutine merge_data_section_into: not called CC=2 SCAR=17.9
Pod documented
18 0 my ( $class, $merge_into ) = @_;
19 0 ▶ while ( my ($basename, $template) = each %{ $class->data_section } ) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %{$class->data_section;}) 0 0 0
20 0 my ( $chunk, $flavour ) = $basename =~ /(.*)\.([^.]*)/;
21 0 $merge_into->{ $flavour }{ $chunk } = $template;
22 }
23 }
24  
25 1 1;
26  
27 __END__
« Plugin/Web/Request.pm ↑ Summary Plugin/Web.pm »