line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::Rant; |
2
|
1
|
|
|
1
|
|
489
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
47
|
|
3
|
|
|
|
|
|
|
$^W = 1; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
4
|
use vars qw[$VERSION @EXPORT $PUNC $CURSE $VOID $RANT]; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
253
|
|
6
|
|
|
|
|
|
|
$VERSION = (qw$Revision: 0.1$)[1]; |
7
|
|
|
|
|
|
|
@EXPORT = qw[vent]; |
8
|
|
|
|
|
|
|
$PUNC = quotemeta q[!@#\$%^&*_?]; |
9
|
|
|
|
|
|
|
$CURSE = qr/ |
10
|
|
|
|
|
|
|
(?: |
11
|
|
|
|
|
|
|
(?: |
12
|
|
|
|
|
|
|
(?:what|why|who|where|when|how) |
13
|
|
|
|
|
|
|
\s+ |
14
|
|
|
|
|
|
|
)? |
15
|
|
|
|
|
|
|
the\s+)? # possible prefix |
16
|
|
|
|
|
|
|
[$PUNC]{3,} # frustrated cursing |
17
|
|
|
|
|
|
|
(?:-[\w]+)? # possible suffix |
18
|
|
|
|
|
|
|
(?:\s*,)? # possible comma |
19
|
|
|
|
|
|
|
/xi; |
20
|
|
|
|
|
|
|
$VOID = qr/ |
21
|
|
|
|
|
|
|
(?:my|our|use|sub|local)[\s(]+$ # keywords |
22
|
|
|
|
|
|
|
/x; |
23
|
|
|
|
|
|
|
$RANT = ''; |
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
1
|
|
5
|
use base qw[Exporter]; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
253
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
use Filter::Simple sub { |
28
|
1
|
|
|
|
|
257
|
s/RANT/\$Acme::Rant::RANT = q/; |
29
|
1
|
100
|
|
|
|
20
|
s<$CURSE> |
|
2
|
|
|
|
|
104
|
|
30
|
|
|
|
|
|
|
<$` =~ /$VOID/ ? '' : 'vent'>ge; |
31
|
1
|
|
|
1
|
|
134365
|
}; |
|
1
|
|
|
|
|
172695
|
|
|
1
|
|
|
|
|
10
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub vent { |
34
|
1
|
|
|
1
|
0
|
11
|
my ($data) = @_; |
35
|
|
|
|
|
|
|
|
36
|
1
|
|
50
|
|
|
14
|
return defined($data) || 1; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |