lib/Perl/ToPerl6/ThemeListing.pm

filter: Statementstmt 100% 29 / 29 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 8 / 8 Podpod 100% 2 / 2 totaltotal 95.2% 40 / 42 CC 3 SCAR 3.4
CC
3
Cov
97%
new
2.0
to_string
2.0
BEGIN
1.0
CRAP 1.4
« lib/Perl/ToPerl6/Transformer/BasicTypes/Strings/AddWhitespace.pm ↑ Summary lib/Perl/ToPerl6/Exception/Configuration/Option.pm »
1 package Perl::ToPerl6::ThemeListing;
2  
3 1 ▶use 5.006001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use English qw<-no_match_vars>;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use Perl::ToPerl6::Utils qw< hashify >;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 ▶use overload ( q<""> => 'to_string' );
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 #-----------------------------------------------------------------------------
14  
15 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod documented
16 1 my ($class, %args) = @_;
17  
18 1 my $self = bless {}, $class;
19  
20 1 ▶ $self->{_transformers} = $args{-transformers} || [];
Condition50%1/2
$args{'-transformers'} || []
l!l
10
MC/DC0%0/1
$args{'-transformers'} || []
$args{'-transformers'}
Truth table50%1/2
A
A= $args{'-transformers'}
Aresult
11
00
21  
22 1 return $self;
23 }
24  
25 #-----------------------------------------------------------------------------
26  
27 1 ▶sub to_string {
Subroutine to_string: called CC=2 SCAR=6.9
Pod documented
28 1 my ($self) = @_;
29  
30 1 my %themes;
31 1 foreach my $transformer ( @{ $self->{_transformers} } ) {
32 38 my @themes = $transformer->get_themes();
33 38 @themes{ @themes } = @themes;
34 }
35  
36 1 return join ("\n", sort keys %themes) . "\n";
37 }
38  
39 #-----------------------------------------------------------------------------
40  
41 1 1;
42  
43 __END__
« lib/Perl/ToPerl6/Transformer/BasicTypes/Strings/AddWhitespace.pm ↑ Summary lib/Perl/ToPerl6/Exception/Configuration/Option.pm »