lib/Perl/ToPerl6/Transformer/Builtins/Rename.pm

filter: Statementstmt 90.6% 29 / 32 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 92.3% 12 / 13 Podpod 60.0% 3 / 5 totaltotal 88.0% 44 / 50 CC 1 SCAR 0.7
CC
1
Cov
91%
transform
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« lib/Perl/ToPerl6/Transformer/CompoundStatements/RenameForeach.pm ↑ Summary script/perlmogrify »
1 package Perl::ToPerl6::Transformer::Builtins::Rename;
2  
3 17 ▶use 5.006001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 17 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 17 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 17 ▶use Readonly;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 17 ▶use Perl::ToPerl6::Utils qw{ :severities };
Subroutine BEGIN: called CC=1 SCAR=0.0
9 17 ▶use Perl::ToPerl6::Utils::PPI qw{ is_ppi_token_word };
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 17 ▶use base 'Perl::ToPerl6::Transformer';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 #-----------------------------------------------------------------------------
14  
15 17 Readonly::Scalar my $DESC => q{Rename builtins};
16 17 Readonly::Scalar my $EXPL => q{Rename builtins};
17  
18 #-----------------------------------------------------------------------------
19  
20 17 my %map = (
21 eval => 'EVAL',
22 );
23  
24 38 ▶sub supported_parameters { return () }
Subroutine supported_parameters: called CC=1 SCAR=0.0
Pod undocumented
25 27 ▶sub default_necessity { return $NECESSITY_HIGHEST }
Subroutine default_necessity: called CC=1 SCAR=0.0
Pod documented
26 24 ▶sub default_themes { return qw( core ) }
Subroutine default_themes: called CC=1 SCAR=0.0
Pod documented
27 5 ▶sub applies_to {
Subroutine applies_to: called CC=1 SCAR=0.0
Pod documented
28 78 ▶ return sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
29 78 is_ppi_token_word($_[1], %map)
30 }
31 5 }
32  
33 #-----------------------------------------------------------------------------
34  
35 0 ▶sub transform {
Subroutine transform: not called CC=1 SCAR=6.9
Pod undocumented
36 0 my ($self, $elem, $doc) = @_;
37  
38 $elem->set_content(
39 0 $map{$elem->content}
40 );
41  
42 0 return $self->transformation( $DESC, $EXPL, $elem );
43 }
44  
45 17 1;
46  
47 #-----------------------------------------------------------------------------
48  
49 __END__
« lib/Perl/ToPerl6/Transformer/CompoundStatements/RenameForeach.pm ↑ Summary script/perlmogrify »