line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package underscore; |
2
|
2
|
|
|
2
|
|
48543
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
71
|
|
3
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
71
|
|
4
|
2
|
|
|
2
|
|
11
|
use Carp (); |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
249
|
|
5
|
|
|
|
|
|
|
our $VERSION = sprintf "%d.%02d", q$Revision: 0.1 $ =~ /(\d+)/g; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub TIESCALAR{ |
8
|
1
|
|
|
1
|
|
3
|
my ($pkg, $code, $msg) = @_; |
9
|
1
|
|
|
|
|
2031
|
bless [$code, $msg], $pkg; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub unimport { |
13
|
1
|
|
|
1
|
|
8
|
my $pkg = shift; |
14
|
1
|
|
|
|
|
2
|
my $action = shift; |
15
|
2
|
|
|
2
|
|
10
|
no strict 'refs'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
408
|
|
16
|
0
|
|
|
|
|
0
|
my $code = |
17
|
|
|
|
|
|
|
ref $action ? $action |
18
|
1
|
50
|
|
|
|
7
|
: $action ? \&{ 'Carp::' . $action } |
|
|
50
|
|
|
|
|
|
19
|
|
|
|
|
|
|
: \&Carp::croak; |
20
|
1
|
|
50
|
|
|
9
|
my $msg = shift || '$_ is forbidden'; |
21
|
1
|
50
|
|
|
|
4
|
untie $_ if tied $_; |
22
|
1
|
|
|
|
|
5
|
tie $_, __PACKAGE__, $code, $msg; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
1
|
|
14
|
sub import{ untie $_ } |
26
|
|
|
|
|
|
|
|
27
|
4
|
|
|
4
|
|
3303
|
sub FETCH{ $_[0]->[0]($_[0]->[1]) } |
28
|
2
|
|
|
2
|
|
926
|
sub STORE{ $_[0]->[0]($_[0]->[1]) } |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; # End of underscore |
31
|
|
|
|
|
|
|
__END__ |