blib/lib/Mason/t/Compilation.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 96.0% 24 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
test_pure_perl
1.0
__ANON__
1.0
CRAP 1.0
« blib/lib/Mason/t/Globals.pm ↑ Summary blib/lib/Mason/t/Errors.pm »
1 package Mason::t::Compilation;
2 1 $Mason::t::Compilation::VERSION = '2.24';
3 1 ▶use Test::Class::Most parent => 'Mason::Test::Class';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶sub test_pure_perl : Tests {
Subroutine test_pure_perl: called CC=1 SCAR=0.0
Pod undocumented
6 1 my $self = shift;
7  
8 my $std =
9 1 ▶ sub { my $num = shift; sprintf( 'method main () { my $foo = %s; print $foo; }', $num ) };
Subroutine __ANON__: called CC=1 SCAR=0.0
10  
11 1 $self->add_comp( path => '/print1.pl', src => $std->(53) );
12 1 $self->test_comp(
13 path => '/top1.mp',
14 src => 'method main () { $m->comp("/print1.pl") }',
15 expect => $std->(53),
16 );
17  
18 1 $self->setup_interp( pure_perl_extensions => ['.pl'] );
19 1 $self->add_comp( path => '/print2.pl', src => $std->(54) );
20 1 $self->test_comp( path => '/top2.mp', src => '<& print2.pl &>', expect => '54' );
21  
22 1 $self->setup_interp( pure_perl_extensions => [] );
23 1 $self->add_comp( path => '/print3.pl', src => $std->(55) );
24 1 $self->test_comp(
25 path => '/top3.mp',
26 src => '<& print3.pl &>',
27 expect => $std->(55),
28 );
29 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
30  
31 1 1;
« blib/lib/Mason/t/Globals.pm ↑ Summary blib/lib/Mason/t/Errors.pm »