line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::DotDotGone; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
48707
|
use 5.006; |
|
1
|
|
|
|
|
3
|
|
4
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
16
|
|
5
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
180
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our %dots; |
10
|
|
|
|
|
|
|
BEGIN { |
11
|
|
|
|
|
|
|
%dots = ( |
12
|
|
|
|
|
|
|
toDots => sub { |
13
|
0
|
|
|
|
|
0
|
join ' ', map { $dots{$_}() } split '', unpack "b*", shift; |
|
0
|
|
|
|
|
0
|
|
14
|
|
|
|
|
|
|
}, |
15
|
|
|
|
|
|
|
fromDots => sub { |
16
|
0
|
|
|
|
|
0
|
pack "b*", join '', map { $dots{$_}() } split ' ', shift; |
|
0
|
|
|
|
|
0
|
|
17
|
|
|
|
|
|
|
}, |
18
|
0
|
|
|
|
|
0
|
'.' => sub { 0 }, |
19
|
0
|
|
|
|
|
0
|
'..' => sub { 1 }, |
20
|
0
|
|
|
|
|
0
|
0 => sub { '.' }, |
21
|
0
|
|
|
|
|
0
|
1 => sub { '..' }, |
22
|
0
|
|
|
|
|
0
|
stderr => sub { print @_ } |
23
|
1
|
|
|
1
|
|
11
|
); |
24
|
1
|
|
|
|
|
321
|
close STDERR; # *\o/* |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub import { |
28
|
1
|
|
|
1
|
|
39
|
open FH, "<$0"; |
29
|
|
|
|
|
|
|
|
30
|
1
|
50
|
|
|
|
7
|
my $reg = $_[1] |
31
|
|
|
|
|
|
|
? qr/(.*)\1^\s*use\s+Acme::DotDotGone\s+($_[1]);\n/ |
32
|
|
|
|
|
|
|
: qr/.*^\s*use\s+Acme::DotDotGone;\n/; |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
29
|
($_[2] = (join '', )) =~ s/$reg//sm; |
35
|
1
|
50
|
|
|
|
5
|
$_[2] = $1 . $_[2] if $1; |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
|
|
7
|
close FH; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
($_[2], $_[3], $_[4]) = (($2) |
40
|
|
|
|
|
|
|
? ($2 eq 'dot') |
41
|
|
|
|
|
|
|
? sub { |
42
|
0
|
|
|
0
|
|
0
|
$_[1] = $dots{toDots}($_[0]); |
43
|
0
|
|
|
|
|
0
|
$_[0], $_[1], $_[1]; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
: sub { |
46
|
0
|
|
|
0
|
|
0
|
$_[1] = $dots{fromDots}($_[0]); |
47
|
0
|
|
|
|
|
0
|
$_[1], $_[0], $_[1]; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
: ($_[2] =~ m/[a-zA-Z]/) |
50
|
|
|
|
|
|
|
? sub { |
51
|
|
|
|
|
|
|
undef |
52
|
1
|
|
|
1
|
|
3
|
} |
53
|
|
|
|
|
|
|
: sub { |
54
|
0
|
|
|
0
|
|
0
|
$_[1] = $dots{fromDots}($_[0]); |
55
|
0
|
|
|
|
|
0
|
$_[1], $_[0]; |
56
|
|
|
|
|
|
|
} |
57
|
1
|
0
|
|
|
|
8
|
)->($_[2]); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
1
|
50
|
|
|
|
4
|
if ($_[4]) { |
60
|
0
|
0
|
0
|
|
|
0
|
open FH, ">$0" or print "Cannot encode. '$0'\n" and exit; |
61
|
0
|
|
|
|
|
0
|
print FH "use Acme::DotDotGone;\n"; |
62
|
0
|
|
|
|
|
0
|
print FH $_[4]; |
63
|
0
|
|
|
|
|
0
|
close FH; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
1
|
50
|
|
|
|
10
|
do { eval "$_[2]"; $dots{stderr}($@); } if $_[2]; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
__END__ |