| 1 | package t::D; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use B::Hooks::AtRuntime qw/at_runtime after_runtime/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | #use Scalar::Util "weaken"; | ||||||||||
| 5 | #use Devel::FindRef; | ||||||||||
| 6 | #use Devel::Peek; | ||||||||||
| 7 | #use Devel::Cycle; | ||||||||||
| 8 | |||||||||||
| 9 | #my @All; | ||||||||||
| 10 | #warn "\@All: " . \@All; | ||||||||||
| 11 | #warn "\@::D: " . \@::D; | ||||||||||
| 12 | |||||||||||
| 13 | 34 | ▶ | sub new { bless [$_[1]], $_[0] } | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 14 | 10 | ▶ | sub DESTROY { push @::D, @{$_[0] } } | ||||||||
|
Subroutine
DESTROY: called CC=1 SCAR=0.0
| |||||||||||
| 15 | 34 | ▶ | sub import { | ||||||||
|
Subroutine
import: called CC=2 SCAR=6.9
| |||||||||||
| 16 | 34 | my $d = t::D->new($_[1]); | |||||||||
| 17 | # push @All, \$d; | ||||||||||
| 18 | # weaken $All[-1]; | ||||||||||
| 19 | 34 | ▶ | $_[2] ? after_runtime { $d } : at_runtime { $d }; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
| |||||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | #sub dump_all { | ||||||||||
| 23 | # for (@All) { | ||||||||||
| 24 | # ref or next; | ||||||||||
| 25 | # #Dump $$_; | ||||||||||
| 26 | # warn Devel::FindRef::track $$_; | ||||||||||
| 27 | # find_cycle $$_; | ||||||||||
| 28 | # } | ||||||||||
| 29 | #} | ||||||||||
| 30 | |||||||||||
| 31 | 2 | 1; | |||||||||