File Coverage

blib/lib/perl5i/2/UNIVERSAL.pm
Criterion Covered Total %
statement 25 28 89.2
branch 4 4 100.0
condition 3 3 100.0
subroutine 10 13 76.9
pod 0 9 0.0
total 42 57 73.6


line stmt bran cond sub pod time code
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 101     101   545 use strict;
  101         127  
  101         3837  
8 101     101   475 use warnings;
  101         136  
  101         12799  
9              
10             require Carp::Fix::1_25;
11              
12             sub alias {
13 902     902 0 5971 my $self = shift;
14              
15 902 100       2309 Carp::Fix::1_25::croak('Not enough arguments given to alias()') unless @_;
16              
17 901         1907 my @name = @_;
18 901 100 100     2817 unshift @name, (caller)[0] unless @name > 1 or grep /::/, @name;
19              
20 901         2186 my $name = join '::', @name;
21              
22             # If this redefines something, assume the user wanted to
23 101     101   497 no warnings 'redefine';
  101         140  
  101         4207  
24 101     101   434 no strict 'refs';
  101         155  
  101         16324  
25 901         1003 *{$name} = $self;
  901         3932  
26 901         2575 return 1;
27             }
28              
29 0     0 0 0 sub is_number { return }
30 3     3 0 664 sub is_positive { return }
31 3     3 0 654 sub is_negative { return }
32 0     0 0 0 sub is_even { return }
33 0     0 0 0 sub is_odd { return }
34 3     3 0 677 sub is_int { return }
35 3     3 0 787 sub is_integer { return }
36 3     3 0 2194 sub is_decimal { return }
37              
38             1;