| 1 | 6 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 6 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | package Test::Tester::Delegate; | ||||||||||
| 5 | |||||||||||
| 6 | 6 | our $VERSION = '1.302226'; | |||||||||
| 7 | |||||||||||
| 8 | 6 | ▶ | use Scalar::Util(); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | sub new | ||||||||||
| 11 | 6 | ▶ | { | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 12 | 6 | my $pkg = shift; | |||||||||
| 13 | |||||||||||
| 14 | 6 | my $obj = shift; | |||||||||
| 15 | 6 | my $self = bless {}, $pkg; | |||||||||
| 16 | |||||||||||
| 17 | 6 | return $self; | |||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | sub AUTOLOAD | ||||||||||
| 21 | 73 | ▶ | { | ||||||||
|
Subroutine
AUTOLOAD: called CC=2 SCAR=7.0
| |||||||||||
| 22 | 73 | my ($sub) = our $AUTOLOAD =~ /.*::(.*?)$/; | |||||||||
| 23 | |||||||||||
| 24 | 73 | ▶ | return if $sub eq "DESTROY"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | |||||||||||
| 26 | 73 | my $obj = $_[0]->{Object}; | |||||||||
| 27 | |||||||||||
| 28 | 73 | my $ref = $obj->can($sub); | |||||||||
| 29 | 73 | shift(@_); | |||||||||
| 30 | 73 | unshift(@_, $obj); | |||||||||
| 31 | 73 | goto &$ref; | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 1 | ▶ | sub can { | ||||||||
|
Subroutine
can: called CC=2 SCAR=7.6
Pod
undocumented
| |||||||||||
| 35 | 1 | my $this = shift; | |||||||||
| 36 | 1 | my ($sub) = @_; | |||||||||
| 37 | |||||||||||
| 38 | 1 | ▶ | return $this->{Object}->can($sub) if Scalar::Util::blessed($this); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 39 | |||||||||||
| 40 | 0 | return $this->SUPER::can(@_); | |||||||||
| 41 | } | ||||||||||
| 42 | |||||||||||
| 43 | 6 | 1; | |||||||||