line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::ESP; |
2
|
1
|
|
|
1
|
|
1063
|
use vars qw( $VERSION @EXPORT ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
92
|
|
3
|
|
|
|
|
|
|
BEGIN { |
4
|
1
|
|
|
1
|
|
2
|
$VERSION= 1.002_007; |
5
|
1
|
|
|
|
|
2
|
@EXPORT= 8x0 .oO ; |
6
|
1
|
|
|
|
|
4
|
require Exporter; |
7
|
1
|
|
|
|
|
24
|
*import= \&Exporter::import; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
218
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub oO |
13
|
|
|
|
|
|
|
{ |
14
|
0
|
|
|
|
|
|
@_= map { |
15
|
0
|
|
|
0
|
|
|
my $i; |
16
|
0
|
0
|
|
|
|
|
eval{%$_||1}?(!%$_?():( $i= $_, join ". ", map |
|
0
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
"$_: $$i{$_}", map substr("m;V",0,length) ^ $_, sort map |
18
|
|
|
|
|
|
|
$_ ^ substr("m;V",0,length), keys %$i ) . "." ) : |
19
|
0
|
0
|
|
|
|
|
eval{1+@$_}?(!@$_?(): join( "; ", @$_ ) ) : $_ |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
20
|
|
|
|
|
|
|
} @_; |
21
|
0
|
0
|
|
|
|
|
my( $thought )= !@_ ? undef : join " ... ", @_; |
22
|
0
|
|
|
|
|
|
return bless \$thought, 'Acme::ESP::Scanner'; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
1
|
0
|
704
|
sub O'o { [ shift,oO( @_ ) ]->[!$[] } |
|
1
|
|
|
0
|
|
423
|
|
|
1
|
|
|
|
|
63
|
|
|
0
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
package Acme::ESP::Scanner; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
use overload( |
30
|
1
|
|
|
|
|
11
|
'.' => \&scan, |
31
|
|
|
|
|
|
|
nomethod => \&explode, |
32
|
1
|
|
|
1
|
|
5
|
); |
|
1
|
|
|
|
|
1
|
|
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
1
|
|
63
|
use vars qw( $openMind $fmt @fail ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
653
|
|
35
|
|
|
|
|
|
|
#_init(); sub _init { # (Just for Devel::Cover's sake) |
36
|
|
|
|
|
|
|
$openMind= 1<<25; |
37
|
|
|
|
|
|
|
{ |
38
|
|
|
|
|
|
|
my $think= "thoughts"; |
39
|
|
|
|
|
|
|
my $mind= \$think; |
40
|
|
|
|
|
|
|
my( $p2, $rc, $f )= |
41
|
|
|
|
|
|
|
unpack "LLL", unpack "P12", pack "L", $mind; |
42
|
|
|
|
|
|
|
my $state= unpack "C", pack "V", $f; |
43
|
|
|
|
|
|
|
my $nv= eval { length pack "F", 1.0 } || 8; |
44
|
|
|
|
|
|
|
my $pad= $nv - 4; |
45
|
|
|
|
|
|
|
if( $state == 4 ) { |
46
|
|
|
|
|
|
|
$openMind >>= 4; |
47
|
|
|
|
|
|
|
$pad= 0; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
if( $openMind & $f ) { |
50
|
|
|
|
|
|
|
die "Closed minds appear open (", log($openMind)/log(2), ").\n"; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
substr( $$mind, 0, 3, "" ); |
53
|
|
|
|
|
|
|
( $p2, $rc, $f )= |
54
|
|
|
|
|
|
|
unpack "LLL", unpack "P12", pack "L", $mind; |
55
|
|
|
|
|
|
|
if( ! $openMind & $f ) { |
56
|
|
|
|
|
|
|
warn "Warning: Open minds appear closed.\n" |
57
|
|
|
|
|
|
|
if $^W; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
my $size= eval { length( pack "J", 1 ) }; |
60
|
|
|
|
|
|
|
my $last= "J"; |
61
|
|
|
|
|
|
|
if( ! defined $size ) { |
62
|
|
|
|
|
|
|
$last= "L"; |
63
|
|
|
|
|
|
|
} elsif( 4 < $size ) { |
64
|
|
|
|
|
|
|
$last= "x4J" |
65
|
|
|
|
|
|
|
if 0 == $pad % 8; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
##@fail= 'Testing'; |
68
|
|
|
|
|
|
|
while( 1 ) { |
69
|
|
|
|
|
|
|
my $pre= $pad ? "x$pad" : ''; |
70
|
|
|
|
|
|
|
$fmt= $pre . "L3" . $last; |
71
|
|
|
|
|
|
|
my( $pv, $cur, $siz, $iv )= |
72
|
|
|
|
|
|
|
unpack $fmt, unpack "P32", pack "L", $p2; |
73
|
|
|
|
|
|
|
last if 3 == $iv; |
74
|
|
|
|
|
|
|
push @fail, sprintf "%s:%x<%x:%x", $fmt, $cur, $siz, $iv; |
75
|
|
|
|
|
|
|
die "Too much skepticism (@fail).\n" |
76
|
|
|
|
|
|
|
if $last !~ s/x4// |
77
|
|
|
|
|
|
|
&& $last !~ s/J$/L/; |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
}; |
80
|
|
|
|
|
|
|
##die; |
81
|
|
|
|
|
|
|
#} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub scan |
84
|
|
|
|
|
|
|
{ |
85
|
0
|
|
|
0
|
|
|
my( $scanner, $mind, $right )= @_; |
86
|
0
|
0
|
|
|
|
|
die "Attempt to read scanner's mind!\n" |
87
|
|
|
|
|
|
|
if ! $right; |
88
|
0
|
|
|
|
|
|
$mind= \$_[1]; |
89
|
0
|
|
|
|
|
|
my $secret= ''; |
90
|
0
|
|
|
|
|
|
my( $p2, $rc, $f, $p3 )= |
91
|
|
|
|
|
|
|
unpack "L4", unpack "P16", pack "L", $mind; |
92
|
0
|
0
|
|
|
|
|
if( $openMind & $f ) { |
93
|
0
|
|
|
|
|
|
my( $pv, $cur, $siz, $iv )= |
94
|
|
|
|
|
|
|
unpack $fmt, unpack "P32", pack "L", $p2; |
95
|
0
|
0
|
|
|
|
|
$pv= $p3 |
96
|
|
|
|
|
|
|
if $fmt =~ /^x/; |
97
|
0
|
|
|
|
|
|
$secret= unpack "P$iv", pack "L", $pv-$iv; |
98
|
|
|
|
|
|
|
} |
99
|
0
|
|
|
|
|
|
bless $scanner, 'Acme::ESP'; |
100
|
0
|
|
|
|
|
|
my $thought= $$scanner; |
101
|
0
|
0
|
|
|
|
|
if( defined $thought ) { |
102
|
|
|
|
|
|
|
# It is surprising how hard it can be to clear your mind. |
103
|
|
|
|
|
|
|
# It'd be nice to do this less destructively. |
104
|
0
|
|
|
|
|
|
my $surface= "$$mind"; |
105
|
0
|
|
|
|
|
|
$$mind= undef; |
106
|
0
|
|
|
|
|
|
$$mind= $thought . $surface; |
107
|
0
|
|
|
|
|
|
substr( $$mind, 0, length($thought), "" ); |
108
|
|
|
|
|
|
|
} |
109
|
0
|
|
|
|
|
|
return $secret; |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
sub explode |
113
|
|
|
|
|
|
|
{ |
114
|
0
|
|
|
0
|
|
|
die "Acme::ESP mis-used.\n"; |
115
|
|
|
|
|
|
|
} |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
'relax' |
118
|
|
|
|
|
|
|
__END__ |