line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::Warn::LOLCAT; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
26065
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
36
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
5
|
1
|
|
|
1
|
|
1410
|
use Acme::LOLCAT qw(translate); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# Intrusive lolcat is intrusive |
10
|
|
|
|
|
|
|
no warnings 'redefine'; |
11
|
|
|
|
|
|
|
*CORE::GLOBAL::warn = |
12
|
|
|
|
|
|
|
$main::SIG{__WARN__} = sub{ |
13
|
|
|
|
|
|
|
my $message = shift || "Warning: something's wrong"; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my (undef, $file, $line) = caller(0); |
16
|
|
|
|
|
|
|
$message .= " at $file line $line\n" unless ($message =~ /\n$/); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$message = translate($message); |
19
|
|
|
|
|
|
|
$message =~ s/\n\. KTHXBYE!//g; |
20
|
|
|
|
|
|
|
$message =~ s/\n\. KTHX.//g; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
CORE::warn($message); |
23
|
|
|
|
|
|
|
}; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |