| 1 | package Net::ACME2::AccessorBase; | ||||||||||
| 2 | |||||||||||
| 3 | 4 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 4 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 4 | our $AUTOLOAD; | |||||||||
| 7 | |||||||||||
| 8 | sub new { | ||||||||||
| 9 | 2 | ▶ | my ($class, %opts) = @_; | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 10 | |||||||||||
| 11 | 2 | $opts{"_$_"} = delete $opts{$_} for keys %opts; | |||||||||
| 12 | |||||||||||
| 13 | 2 | return bless \%opts, $class; | |||||||||
| 14 | } | ||||||||||
| 15 | |||||||||||
| 16 | sub AUTOLOAD { | ||||||||||
| 17 | 8 | ▶ | my ($self) = @_; | ||||||||
|
Subroutine
AUTOLOAD: called CC=4 SCAR=14.2
| |||||||||||
| 18 | |||||||||||
| 19 | 8 | ▶ | $AUTOLOAD =~ m<(.+)::(.+)> or die "Weird func name: â$AUTOLOADâ!"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 8 | my ($class, $method) = ($1, $2); | |||||||||
| 21 | |||||||||||
| 22 | 8 | ▶ | if ( grep { $method eq $_ } $self->_ACCESSORS() ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | 6 | return $self->{"_$method"}; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 2 | ▶ | return if $method eq 'DESTROY'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | |||||||||||
| 28 | 0 | die "â$classâ doesnât define a method â$methodâ!"; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 4 | 1; | |||||||||