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 | 440 | use strict; use warnings FATAL => 'all'; | |||
1 | 1 | 2 | |||||
1 | 36 | ||||||
1 | 5 | ||||||
1 | 1 | ||||||
1 | 34 | ||||||
3 | 1 | 1 | 5 | use parent 'Class::Property::RW'; | |||
1 | 1 | ||||||
1 | 8 | ||||||
4 | 1 | 1 | 72 | use Carp; | |||
1 | 1 | ||||||
1 | 150 | ||||||
5 | |||||||
6 | sub STORE | ||||||
7 | { | ||||||
8 | 3 | 3 | 6 | my( $self, $value ) = @_; | |||
9 | 3 | 672 | croak sprintf( | ||||
10 | 'Unable to set read-only property %s' | ||||||
11 | 3 | 7 | , ${$self}->{'field'} | ||||
12 | ); | ||||||
13 | } | ||||||
14 | |||||||
15 | 1; |