blib/lib/Class/Property/RO.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 15 | 15 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 5 | 5 | 100.0 |
pod | n/a | ||
total | 20 | 20 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Class::Property::RO; | ||||||
2 | 1 | 1 | 322 | use strict; use warnings FATAL => 'all'; | |||
1 | 1 | 1 | |||||
1 | 31 | ||||||
1 | 4 | ||||||
1 | 1 | ||||||
1 | 28 | ||||||
3 | 1 | 1 | 4 | use parent 'Class::Property::RW'; | |||
1 | 1 | ||||||
1 | 5 | ||||||
4 | 1 | 1 | 43 | use Carp; | |||
1 | 1 | ||||||
1 | 106 | ||||||
5 | |||||||
6 | sub STORE | ||||||
7 | { | ||||||
8 | 3 | 3 | 8 | my( $self, $value ) = @_; | |||
9 | 3 | 669 | croak sprintf( | ||||
10 | 'Unable to set read-only property %s' | ||||||
11 | 3 | 10 | , ${$self}->{'field'} | ||||
12 | ); | ||||||
13 | } | ||||||
14 | |||||||
15 | 1; |