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

filter: Statementstmt 100% 32 / 32 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 13 / 13 Podpod 60.0% 3 / 5 totaltotal 96.0% 48 / 50 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« script/perlmogrify ↑ Summary lib/Perl/ToPerl6/Exception.pm »
1 package Perl::ToPerl6::Transformer::Builtins::AddWhitespace;
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{
Subroutine BEGIN: called CC=1 SCAR=0.0
10 is_ppi_token_word
11 insert_trailing_whitespace
12 17 };
13  
14 17 ▶use base 'Perl::ToPerl6::Transformer';
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 #-----------------------------------------------------------------------------
17  
18 17 Readonly::Scalar my $DESC => q{Transform my(...) to my (...)};
19 17 Readonly::Scalar my $EXPL => q{Transform my(...) to my (...)};
20  
21 #-----------------------------------------------------------------------------
22  
23 17 my %map = (
24 my => 1,
25 our => 1,
26 print => 1,
27 );
28  
29 38 ▶sub supported_parameters { return () }
Subroutine supported_parameters: called CC=1 SCAR=0.0
Pod undocumented
30 31 ▶sub default_necessity { return $NECESSITY_HIGHEST }
Subroutine default_necessity: called CC=1 SCAR=0.0
Pod documented
31 24 ▶sub default_themes { return qw( core ) }
Subroutine default_themes: called CC=1 SCAR=0.0
Pod documented
32 5 ▶sub applies_to {
Subroutine applies_to: called CC=1 SCAR=0.0
Pod documented
33 78 ▶ return sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
34 78 is_ppi_token_word($_[1], %map)
35 }
36 5 }
37  
38 #-----------------------------------------------------------------------------
39  
40 4 ▶sub transform {
Subroutine transform: called CC=1 SCAR=0.0
Pod undocumented
41 4 my ($self, $elem, $doc) = @_;
42  
43 4 insert_trailing_whitespace($elem);
44  
45 4 return $self->transformation( $DESC, $EXPL, $elem );
46 }
47  
48 17 1;
49  
50 #-----------------------------------------------------------------------------
51  
52 __END__
« script/perlmogrify ↑ Summary lib/Perl/ToPerl6/Exception.pm »