line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Ref::Util; |
2
|
|
|
|
|
|
|
# ABSTRACT: Utility functions for checking references |
3
|
|
|
|
|
|
|
$Ref::Util::VERSION = '0.202'; |
4
|
10
|
|
|
10
|
|
113236
|
use strict; |
|
10
|
|
|
|
|
23
|
|
|
10
|
|
|
|
|
249
|
|
5
|
10
|
|
|
10
|
|
48
|
use warnings; |
|
10
|
|
|
|
|
18
|
|
|
10
|
|
|
|
|
310
|
|
6
|
|
|
|
|
|
|
|
7
|
10
|
|
|
10
|
|
49
|
use Exporter 5.57 'import'; |
|
10
|
|
|
|
|
176
|
|
|
10
|
|
|
|
|
1070
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
{ |
10
|
|
|
|
|
|
|
my $impl = $ENV{REF_UTIL_IMPLEMENTATION} |
11
|
|
|
|
|
|
|
|| our $IMPLEMENTATION |
12
|
|
|
|
|
|
|
|| 'XS'; |
13
|
|
|
|
|
|
|
if ($impl ne 'PP' && eval { require Ref::Util::XS; 1 }) { |
14
|
|
|
|
|
|
|
_install_aliases('Ref::Util::XS'); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
else { |
17
|
|
|
|
|
|
|
require Ref::Util::PP; |
18
|
|
|
|
|
|
|
_install_aliases('Ref::Util::PP'); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub _install_aliases { |
23
|
10
|
|
|
10
|
|
23
|
my ($package) = @_; |
24
|
10
|
|
|
10
|
|
57
|
no warnings 'once'; |
|
10
|
|
|
|
|
21
|
|
|
10
|
|
|
|
|
343
|
|
25
|
10
|
|
|
10
|
|
45
|
no strict 'refs'; |
|
10
|
|
|
|
|
22
|
|
|
10
|
|
|
|
|
1053
|
|
26
|
10
|
|
|
|
|
21
|
our %EXPORT_TAGS = %{"${package}::EXPORT_TAGS"}; |
|
10
|
|
|
|
|
67
|
|
27
|
10
|
|
|
|
|
23
|
our @EXPORT_OK = @{"${package}::EXPORT_OK"}; |
|
10
|
|
|
|
|
51
|
|
28
|
10
|
|
|
|
|
94
|
*$_ = \&{"${package}::$_"} for '_using_custom_ops', @EXPORT_OK; |
|
270
|
|
|
|
|
979
|
|
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |