Acme-Warn-LOLCAT
view release on metacpan or search on metacpan
lib/Acme/Warn/LOLCAT.pm view on Meta::CPAN
use Acme::LOLCAT qw(translate);
our $VERSION = '0.02';
# Intrusive lolcat is intrusive
no warnings 'redefine';
*CORE::GLOBAL::warn =
$main::SIG{__WARN__} = sub{
my $message = shift || "Warning: something's wrong";
my (undef, $file, $line) = caller(0);
$message .= " at $file line $line\n" unless ($message =~ /\n$/);
$message = translate($message);
$message =~ s/\n\. KTHXBYE!//g;
$message =~ s/\n\. KTHX.//g;
CORE::warn($message);
};
1;
( run in 0.258 second using v1.01-cache-2.11-cpan-0d8aa00de5b )