blib/lib/Mason/t/LvalueAttributes.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_lvalue
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Mason/t/DollarDot.pm ↑ Summary blib/lib/Mason/Component/Moose.pm »
1 package Mason::t::LvalueAttributes;
2 1 $Mason::t::LvalueAttributes::VERSION = '2.24';
3 1 ▶use Test::Class::Most parent => 'Mason::Test::Class';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 __PACKAGE__->default_plugins( [ '@Default', 'LvalueAttributes' ] );
6  
7 1 ▶sub test_lvalue : Tests {
Subroutine test_lvalue: called CC=1 SCAR=0.0
Pod undocumented
8 1 my $self = shift;
9 1 $self->test_comp(
10 src => '
11 <%class>
12 has "a" => (is => "rw");
13 has "b" => (is => "ro");
14  
15 </%class>
16  
17 <%init>
18 $.a = 5;
19 print "a = " . $.a . "\n";
20 $.a(6);
21 print "a = " . $.a . "\n";
22 eval { $.b = 6 };
23 print $@ . "\n";
24 </%init>
25 ',
26 expect => qr/a = 5\na = 6\nCan't modify.*/,
27 );
28 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
29  
30 1 1;
« blib/lib/Mason/t/DollarDot.pm ↑ Summary blib/lib/Mason/Component/Moose.pm »