mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Add perl __WARN__ handler for scripts, bug #427.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4898 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
e39a087979
commit
877c64a08c
@ -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; }};
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user