| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
## no critic qw(Capitalization ProhibitMultiplePackages ProhibitReusedNames) # SYSTEM DEFAULT 3: allow multiple & lower case package names |
|
2
|
|
|
|
|
|
|
package # hide from PAUSE indexing |
|
3
|
|
|
|
|
|
|
rperlnamespaces; |
|
4
|
7
|
|
|
7
|
|
42
|
use strict; |
|
|
7
|
|
|
|
|
13
|
|
|
|
7
|
|
|
|
|
187
|
|
|
5
|
7
|
|
|
7
|
|
32
|
use warnings; |
|
|
7
|
|
|
|
|
10
|
|
|
|
7
|
|
|
|
|
172
|
|
|
6
|
7
|
|
|
7
|
|
1757
|
use rperlnamespaces_generated; |
|
|
7
|
|
|
|
|
17
|
|
|
|
7
|
|
|
|
|
297
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = 0.002_000; |
|
8
|
|
|
|
|
|
|
|
|
9
|
7
|
|
|
7
|
|
54
|
use Data::Dumper; |
|
|
7
|
|
|
|
|
1098
|
|
|
|
7
|
|
|
|
|
2147
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub array { |
|
12
|
0
|
|
|
0
|
0
|
|
my $namespaces = []; |
|
13
|
0
|
|
|
|
|
|
for my $name ( sort keys %main:: ) { |
|
14
|
0
|
|
|
|
|
|
my $glob = $main::{$name}; |
|
15
|
0
|
0
|
0
|
|
|
|
if ( (not ref $glob) and %{$glob} ) { # check glob ref to avoid "not a HASH reference" error on DUMMY code refs |
|
|
0
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
push @{$namespaces}, $name; |
|
|
0
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
} |
|
19
|
0
|
|
|
|
|
|
return $namespaces; |
|
20
|
|
|
|
|
|
|
} |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub hash { |
|
23
|
|
|
|
|
|
|
# print 'in rperlnamespaces::hash(), top of subroutine', "\n"; |
|
24
|
0
|
|
|
0
|
0
|
|
my $namespaces = {}; |
|
25
|
0
|
|
|
|
|
|
for my $name ( sort keys %main:: ) { |
|
26
|
0
|
|
|
|
|
|
my $glob = $main::{$name}; |
|
27
|
|
|
|
|
|
|
# print 'in rperlnamespaces::hash(), have ref $glob = ', ref $glob, "\n"; |
|
28
|
|
|
|
|
|
|
# print 'in rperlnamespaces::hash(), have $glob = ', Dumper($glob), "\n"; |
|
29
|
0
|
0
|
0
|
|
|
|
if ( (not ref $glob) and %{$glob} ) { # check glob ref to avoid "not a HASH reference" error on DUMMY code refs |
|
|
0
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
$namespaces->{$name} = 1; |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
# print 'in rperlnamespaces::hash(), bottom of subroutine, about to return $namespaces = ', Dumper($namespaces), "\n"; |
|
34
|
0
|
|
|
|
|
|
return $namespaces; |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub hash_noncore { |
|
38
|
|
|
|
|
|
|
# print 'in hash_noncore(), have $rperlnamespaces_generated::CORE = ' . Dumper($rperlnamespaces_generated::CORE) . "\n"; |
|
39
|
0
|
|
|
0
|
0
|
|
my $namespaces = {}; |
|
40
|
0
|
|
|
|
|
|
for my $name ( sort keys %main:: ) { |
|
41
|
0
|
|
|
|
|
|
my $glob = $main::{$name}; |
|
42
|
0
|
0
|
0
|
|
|
|
if ( (not ref $glob) and %{$glob} # check glob ref to avoid "not a HASH reference" error on DUMMY code refs |
|
|
0
|
|
0
|
|
|
|
|
|
43
|
|
|
|
|
|
|
and ( not exists $rperlnamespaces_generated::CORE->{$name} ) ) |
|
44
|
|
|
|
|
|
|
{ |
|
45
|
0
|
|
|
|
|
|
$namespaces->{$name} = 1; |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
} |
|
48
|
0
|
|
|
|
|
|
return $namespaces; |
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub hash_noncore_nonrperl { |
|
52
|
|
|
|
|
|
|
# print 'in hash_noncore(), have $rperlnamespaces_generated::CORE = ' . Dumper($rperlnamespaces_generated::CORE) . "\n"; |
|
53
|
0
|
|
|
0
|
0
|
|
my $namespaces = {}; |
|
54
|
0
|
|
|
|
|
|
for my $name ( sort keys %main:: ) { |
|
55
|
0
|
|
|
|
|
|
my $glob = $main::{$name}; |
|
56
|
0
|
0
|
0
|
|
|
|
if ( (not ref $glob) and %{$glob} # check glob ref to avoid "not a HASH reference" error on DUMMY code refs |
|
|
0
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
57
|
|
|
|
|
|
|
and ( not exists $rperlnamespaces_generated::CORE->{$name} ) |
|
58
|
|
|
|
|
|
|
and ( not exists $rperlnamespaces_generated::RPERL->{$name} ) ) |
|
59
|
|
|
|
|
|
|
{ |
|
60
|
0
|
|
|
|
|
|
$namespaces->{$name} = 1; |
|
61
|
|
|
|
|
|
|
} |
|
62
|
|
|
|
|
|
|
} |
|
63
|
0
|
|
|
|
|
|
return $namespaces; |
|
64
|
|
|
|
|
|
|
} |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |