line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mason::t::DollarDot; |
2
|
|
|
|
|
|
|
$Mason::t::DollarDot::VERSION = '2.22'; |
3
|
1
|
|
|
1
|
|
1748
|
use Test::Class::Most parent => 'Mason::Test::Class'; |
|
1
|
|
|
|
|
43759
|
|
|
1
|
|
|
|
|
7
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub test_dollardot : Tests { |
6
|
|
|
|
|
|
|
my $self = shift; |
7
|
|
|
|
|
|
|
$self->add_comp( |
8
|
|
|
|
|
|
|
path => '/helper.mi', |
9
|
|
|
|
|
|
|
src => '<%class>has "foo";</%class> |
10
|
|
|
|
|
|
|
Helper: <% $.foo %> |
11
|
|
|
|
|
|
|
', |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
$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
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |