summaryrefslogtreecommitdiff
path: root/src/perl
diff options
context:
space:
mode:
Diffstat (limited to 'src/perl')
-rw-r--r--src/perl/irssi-core.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/perl/irssi-core.pl b/src/perl/irssi-core.pl
index 11aa0f6f..50c2933f 100644
--- a/src/perl/irssi-core.pl
+++ b/src/perl/irssi-core.pl
@@ -21,6 +21,10 @@ sub eval_data {
my ($data, $id) = @_;
destroy("Irssi::Script::$id");
+ $SIG{__WARN__} = sub {
+ Irssi::print("Warning in script $id:");
+ print $_[0];
+ };
my $package = "Irssi::Script::$id";
my $eval = qq{package $package; %s sub handler { $data; }};
{