line |
true |
false |
branch |
23
|
0 |
3 |
unless defined $subs |
26
|
2 |
1 |
if ($xtra ne 'no_new') |
28
|
1 |
1 |
if ($xtra ne 'new_init') { } |
|
1 |
0 |
elsif ($xtra eq 'new_init') { } |
59
|
0 |
6 |
if defined &{"${pkg}::$sub";} |
65
|
1 |
3 |
unless exists $obj_{$self}{$sub} |
68
|
1 |
3 |
if ($#_ > 0) |
69
|
0 |
1 |
if ref $$subs{$sub} and not ref $value |
80
|
0 |
6 |
unless *{"${pkg}::$sub";} = sub {
my($self, $value) = @_;
$obj_{$self}{$sub} = $$subs{$sub} unless exists $obj_{$self}{$sub};
if ($#_ > 0) {
warn "The value supplied to '$sub()' is not of propper type" if ref $$subs{$sub} and not ref $value;
$obj_{$self}{$sub} = $value;
return $self;
};
return $obj_{$self}{$sub};
} |