line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::Buffy; |
2
|
1
|
|
|
1
|
|
537
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
834
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.6'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
my $horns = "BUffY bUFFY " x 2; |
7
|
|
|
|
|
|
|
my $i = 0; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub _slay { |
10
|
0
|
|
|
0
|
|
0
|
my $willow = unpack "b*", pop; |
11
|
0
|
|
|
|
|
0
|
my @buffy = ( 'b', 'u', 'f', 'f', 'y', ' ' ); |
12
|
0
|
|
|
|
|
0
|
my @BUFFY = ( 'B', 'U', 'F', 'F', 'Y', "\t" ); |
13
|
0
|
|
|
|
|
0
|
my $demons = $horns; |
14
|
0
|
|
|
|
|
0
|
foreach ( split //, $willow ) { |
15
|
0
|
0
|
|
|
|
0
|
$demons .= $_ ? $BUFFY[$i] : $buffy[$i]; |
16
|
0
|
|
|
|
|
0
|
$i++; |
17
|
0
|
0
|
|
|
|
0
|
$i = 0 if $i > 5; |
18
|
|
|
|
|
|
|
} |
19
|
0
|
|
|
|
|
0
|
return $demons; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub _unslay { |
23
|
1
|
|
|
1
|
|
2
|
my $demons = pop; |
24
|
1
|
|
|
|
|
10
|
$demons =~ s/^$horns//g; |
25
|
1
|
|
|
|
|
2
|
my @willow; |
26
|
1
|
|
|
|
|
49
|
foreach ( split //, $demons ) { |
27
|
256
|
100
|
|
|
|
933
|
push @willow, /[buffy ]/ ? 0 : 1; |
28
|
|
|
|
|
|
|
} |
29
|
1
|
|
|
|
|
358
|
return pack "b*", join '', @willow; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub _evil { |
33
|
1
|
|
|
1
|
|
9
|
return $_[0] =~ /\S/; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub _punch { |
37
|
1
|
|
|
1
|
|
30
|
return $_[0] =~ /^$horns/; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub import { |
41
|
1
|
50
|
0
|
1
|
|
45
|
open 0 or print "Can't rebuffy '$0'\n" and exit; |
42
|
1
|
|
|
|
|
33
|
( my $demon = join "", <0> ) =~ s/.*^\s*use\s+Acme::Buffy\s*;\n//sm; |
43
|
1
|
|
|
|
|
51
|
local $SIG{__WARN__} = \&evil; |
44
|
1
|
50
|
33
|
|
|
4
|
do { eval _unslay $demon; exit } |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
1476
|
|
45
|
|
|
|
|
|
|
unless _evil $demon and not _punch $demon; |
46
|
0
|
0
|
0
|
|
|
|
open my $fh, ">$0" or print "Cannot buffy '$0'\n" and exit; |
47
|
0
|
0
|
|
|
|
|
print $fh "use Acme::Buffy;\n", _slay $demon and exit; |
48
|
0
|
0
|
|
|
|
|
print "use Acme::Buffy;\n", _slay $demon and exit; |
49
|
0
|
|
|
|
|
|
return; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
"Grrr, arrrgh"; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |