| 1 | package perl5i::2::UNIVERSAL; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | # Methods which apply to all autoboxed objects. | ||||||||||||||||||||||||||||
| 4 | # | ||||||||||||||||||||||||||||
| 5 | # They do NOT apply to blessed objects. That should go into perl5i::2::Meta::Instance. | ||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 109 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 109 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 109 | require Carp::Fix::1_25; | |||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | sub alias { | ||||||||||||||||||||||||||||
| 13 | 934 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
alias: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | 934 | ▶ | Carp::Fix::1_25::croak('Not enough arguments given to alias()') unless @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 933 | my @name = @_; | |||||||||||||||||||||||||||
| 18 | 933 | ▶ | unshift @name, (caller)[0] unless @name > 1 or grep /::/, @name; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
@name > 1 or grep /::/, @name
MC/DC100%2/2
@name > 1 or grep /::/, @name
@name > 1
grep /::/, @name
Truth table100%3/3
A or B
A= @name > 1B= grep /::/, @name
| |||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 933 | my $name = join '::', @name; | |||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | # If this redefines something, assume the user wanted to | ||||||||||||||||||||||||||||
| 23 | 109 | ▶ | no warnings 'redefine'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 24 | 109 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 25 | 933 | *{$name} = $self; | |||||||||||||||||||||||||||
| 26 | 933 | return 1; | |||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | 0 | ▶ | sub is_number { return } | ||||||||||||||||||||||||||
|
Subroutine
is_number: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 30 | 3 | ▶ | sub is_positive { return } | ||||||||||||||||||||||||||
|
Subroutine
is_positive: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 31 | 3 | ▶ | sub is_negative { return } | ||||||||||||||||||||||||||
|
Subroutine
is_negative: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 32 | 0 | ▶ | sub is_even { return } | ||||||||||||||||||||||||||
|
Subroutine
is_even: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 33 | 0 | ▶ | sub is_odd { return } | ||||||||||||||||||||||||||
|
Subroutine
is_odd: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 34 | 3 | ▶ | sub is_int { return } | ||||||||||||||||||||||||||
|
Subroutine
is_int: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 35 | 3 | ▶ | sub is_integer { return } | ||||||||||||||||||||||||||
|
Subroutine
is_integer: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 36 | 3 | ▶ | sub is_decimal { return } | ||||||||||||||||||||||||||
|
Subroutine
is_decimal: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | 109 | 1; | |||||||||||||||||||||||||||