blib/lib/Mason/t/Defer.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 96.3% 26 / 27 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Mason/t/Reload.pm ↑ Summary blib/lib/Mason/Test/Overrides/Component/StrictMoose.pm »
1 package Mason::t::Defer;
2 1 $Mason::t::Defer::VERSION = '2.24';
3 1 ▶use Test::More;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use base qw(Mason::Test::Class);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶sub test_defer : Test(1) {
Subroutine test_defer: called CC=1 SCAR=0.0
Pod undocumented
9 1 my $self = shift;
10 1 $self->{interp} = $self->create_interp( plugins => [ '@Default', 'Defer' ] );
11 1 $self->test_comp(
12 src => <<'EOF',
13 <%class>
14 my ($title, $subtitle);
15 </%class>
16  
17 Title is <% $m->defer(sub { $title }) %>
18  
19 % $.Defer {{
20 Subtitle is <% $subtitle %>
21 % }}
22  
23 <%perl>
24 $title = 'foo';
25 $subtitle = 'bar';
26 </%perl>
27 EOF
28 expect => <<'EOF',
29 Title is foo
30  
31 Subtitle is bar
32 EOF
33 );
34 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
35  
36 1 1;
« blib/lib/Mason/t/Reload.pm ↑ Summary blib/lib/Mason/Test/Overrides/Component/StrictMoose.pm »