lib/Perl/ToPerl6/TransformerListing.pm

filter: Statementstmt 100% 30 / 30 Branchbran n/a Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 9 / 9 Podpod 100% 2 / 2 totaltotal 100% 44 / 44 CC 2 SCAR 1.8
CC
2
Cov
100%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« lib/Perl/ToPerl6/Transformer/PostfixExpressions/AddWhitespace.pm ↑ Summary lib/Perl/ToPerl6/TransformerParameter/Behavior.pm »
1 package Perl::ToPerl6::TransformerListing;
2  
3 2 ▶use 5.006001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 ▶use English qw(-no_match_vars);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶use Perl::ToPerl6::Transformer qw();
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 ▶use overload ( q<""> => 'to_string' );
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 #-----------------------------------------------------------------------------
14  
15 2 ▶sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
16 2 my ($class, %args) = @_;
17  
18 2 my $self = bless {}, $class;
19  
20 2 ▶ my $transformers = $args{-transformers} || [];
Condition100%2/2
$args{'-transformers'} || []
l!l
11
MC/DC100%1/1
$args{'-transformers'} || []
$args{'-transformers'}
Truth table100%2/2
A
A= $args{'-transformers'}
Aresult
11
00
21 2 $self->{_transformers} = [ sort _by_type @{ $transformers } ];
22  
23 2 return $self;
24 }
25  
26 #-----------------------------------------------------------------------------
27  
28 1 ▶sub to_string {
Subroutine to_string: called CC=1 SCAR=0.0
Pod documented
29 1 my ($self) = @_;
30  
31 1 Perl::ToPerl6::Transformer::set_format( "%s %p [%t]\n" );
32  
33 1 return join q{}, map { "$_" } @{ $self->{_transformers} };
34 }
35  
36 #-----------------------------------------------------------------------------
37  
38 37 ▶sub _by_type { return ref $a cmp ref $b }
Subroutine _by_type: called CC=1 SCAR=0.0
39  
40 2 1;
41  
42 __END__
« lib/Perl/ToPerl6/Transformer/PostfixExpressions/AddWhitespace.pm ↑ Summary lib/Perl/ToPerl6/TransformerParameter/Behavior.pm »