blib/lib/Tapper/Reports/Web/View/Mason.pm

filter: Statementstmt 80.7% 21 / 26 Branchbran n/a Conditioncond 40.0% 2 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 68.2% 28 / 41 CC 1 SCAR 1.5
CC
1
Cov
74%
my_url_filter
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/Tapper/Reports/Web/Controller/Tapper/Hardware.pm ↑ Summary blib/lib/Tapper/Reports/Web/Controller/Tapper/Start.pm »
1 package Tapper::Reports::Web::View::Mason;
2 14 our $AUTHORITY = 'cpan:TAPPER';
3 14 $Tapper::Reports::Web::View::Mason::VERSION = '5.0.17';
4 14 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 14 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 14 extends 'Catalyst::View::HTML::Mason';
7  
8 14 ▶use Cwd;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 14 ▶use File::ShareDir ':ALL';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 14 ▶my $s_root_dir = $ENV{DOCUMENT_ROOT} || Cwd::getcwd . '/root';
Condition50%1/2
$ENV{'DOCUMENT_ROOT'} || Cwd::getcwd() . '/root'
l!l
014
MC/DC0%0/1
$ENV{'DOCUMENT_ROOT'} || Cwd::getcwd() . '/root'
$ENV{'DOCUMENT_ROOT'}
Truth table50%1/2
A
A= $ENV{'DOCUMENT_ROOT'}
Aresult
11
00
12  
13 my $root_dir = [
14 [ tapperroot1 => $s_root_dir ],
15 14 ▶ [ tapperroot2 => eval { dist_dir("Tapper-Reports-Web") } || $s_root_dir ],
Condition33%1/3
eval { do { dist_dir('Tapper-Reports-Web') } } || $s_root_dir
l!l&&r!l&&!r
1400
MC/DC0%0/2
eval { do { dist_dir('Tapper-Reports-Web') } } || $s_root_dir
eval { do { dist_dir('Tapper-Reports-Web') } } $s_root_dir
Truth table33%1/3
A || B
A= eval { do { dist_dir('Tapper-Reports-Web') } }B= $s_root_dir
ABresult
1X1
011
000
16 ];
17  
18 __PACKAGE__->config({ template_extension => '.mas',
19 12 ▶ globals => [['$c' => sub { $_[1] } ]],
Subroutine __ANON__: called CC=1 SCAR=0.0
20 interp_args => { comp_root => $root_dir,
21 default_escape_flags => [ 'h' ],
22 escape_flags => {
23 url => \&my_url_filter,
24 h => \&HTML::Mason::Escapes::basic_html_escape,
25 },
26 },
27 });
28  
29 sub my_url_filter
30 0 ▶{
Subroutine my_url_filter: not called CC=1 SCAR=6.9
Pod undocumented
31 0 my $text_ref = shift;
32 0 my $kopie = $$text_ref;
33 0 Encode::_utf8_off($kopie); # weil URI::URL mit utf8-Flag das falsche macht
34 0 $$text_ref = URI::URL->new($kopie)->as_string;
35 0 $$text_ref =~ s,/,%2F,g;
36 }
37  
38  
39 14 1;
40  
41 # Local Variables:
42 # buffer-file-coding-system: utf-8
43 # End:
44  
45 __END__
« blib/lib/Tapper/Reports/Web/Controller/Tapper/Hardware.pm ↑ Summary blib/lib/Tapper/Reports/Web/Controller/Tapper/Start.pm »