| 1 | package overload::x; | ||||||||||||||
| 2 | 2 | ▶ | use 5.006; use strict; use warnings; our $VERSION = '0.101'; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 3 | 2 | ▶ | use base 'Import::Export'; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 2 | ▶ | use Function::Fallback::CoreOrPP qw(clone); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | |||||||||||||||
| 6 | 2 | our %EX = ( | |||||||||||||
| 7 | n => [qw/all/], | ||||||||||||||
| 8 | x => [qw/all/] | ||||||||||||||
| 9 | ); | ||||||||||||||
| 10 | |||||||||||||||
| 11 | use overload | ||||||||||||||
| 12 | 2 | ▶ | 'x' => \&x; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 13 | |||||||||||||||
| 14 | sub n { | ||||||||||||||
| 15 | 2 | ▶ | my $n = shift; # \shift is really broken AND has varying behaviour depending on which OS you're using apparently | ||||||||||||
|
Subroutine
n: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||
| 16 | 2 | return bless \$n, __PACKAGE__; | |||||||||||||
| 17 | } | ||||||||||||||
| 18 | |||||||||||||||
| 19 | sub x { | ||||||||||||||
| 20 | 5 | ▶ | my ($times, $obj) = @_; | ||||||||||||
|
Subroutine
x: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||||
| 21 | my @times = map { | ||||||||||||||
| 22 | 5 | ▶ | ref $obj ? clone($obj) : $obj | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 23 | } 1 .. (ref $times ? $$times : $times); # IN list context this counts which suckkks... | ||||||||||||||
| 24 | 5 | ▶ | wantarray ? @times : \@times; | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 25 | } | ||||||||||||||
| 26 | |||||||||||||||
| 27 | 2 | 1; | |||||||||||||
| 28 | |||||||||||||||
| 29 | __END__ | ||||||||||||||