blib/lib/perl5i/2/UNIVERSAL.pm untested

filter: Statementstmt 0.0% 0 / 31 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 14 Podpod 0.0% 0 / 9 totaltotal 0.0% 0 / 63 CC 3 SCAR 13.5
CC
3
Cov
0%
alias
12.0
is_number
2.0
is_positive
2.0
CRAP 3.9
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 use strict;
8 use warnings;
9  
10 require Carp::Fix::1_25;
11  
12 sub alias {
13 my $self = shift;
14  
15 Carp::Fix::1_25::croak('Not enough arguments given to alias()') unless @_;
16  
17 my @name = @_;
18 unshift @name, (caller)[0] unless @name > 1 or grep /::/, @name;
19  
20 my $name = join '::', @name;
21  
22 # If this redefines something, assume the user wanted to
23 no warnings 'redefine';
24 no strict 'refs';
25 *{$name} = $self;
26 return 1;
27 }
28  
29 sub is_number { return }
30 sub is_positive { return }
31 sub is_negative { return }
32 sub is_even { return }
33 sub is_odd { return }
34 sub is_int { return }
35 sub is_integer { return }
36 sub is_decimal { return }
37  
38 1;