blib/lib/Mason/t/DollarDot.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 93.3% 14 / 15 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
test_dollardot
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Mason/t/Sanity.pm ↑ Summary blib/lib/Mason/t/LvalueAttributes.pm »
1 package Mason::t::DollarDot;
2 1 $Mason::t::DollarDot::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_dollardot : Tests {
Subroutine test_dollardot: called CC=1 SCAR=0.0
Pod undocumented
6 1 my $self = shift;
7 1 $self->add_comp(
8 path => '/helper.mi',
9 src => '<%class>has "foo";</%class>
10 Helper: <% $.foo %>
11 ',
12 );
13 1 $self->test_comp(
14 src => '
15 <%class>
16 has "name" => ( default => "Joe" );
17  
18 </%class>
19  
20 <%class>
21 has "compname";
22 has "date";
23 </%class>
24  
25 <%method greet>
26 Hello, <% $.name %>. Today is <% $.date %>.
27 </%method>
28  
29 % $.greet();
30  
31 <& $.compname, foo => $.date &>
32 <& /helper.mi, foo => $.name &>
33  
34 <%init>
35 $.date("March 5th");
36 $.compname("helper.mi");
37 </%init>
38 ',
39 expect => '
40 Hello, Joe. Today is March 5th.
41  
42 Helper: March 5th
43  
44 Helper: Joe
45 ',
46 );
47 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
48  
49 1 1;
« blib/lib/Mason/t/Sanity.pm ↑ Summary blib/lib/Mason/t/LvalueAttributes.pm »