summaryrefslogtreecommitdiff
path: root/src/perl/irssi-core.pl
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-11-18 16:16:13 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-11-18 16:16:13 +0000
commit51db872da004bf9d2f8bb92c6636bee20d122ee1 (patch)
tree60b56dfd9ed7405d7ef372f5ce64df3f51718231 /src/perl/irssi-core.pl
parent034e75ee196393338adf26936f7c3c80ad6d6fac (diff)
downloadirssi-51db872da004bf9d2f8bb92c6636bee20d122ee1.zip
/SCRIPT UNLOAD didn't destroy the perl package from memory. Also the scripts
weren't destroyed when error occured in them. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2053 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/irssi-core.pl')
-rw-r--r--src/perl/irssi-core.pl5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/perl/irssi-core.pl b/src/perl/irssi-core.pl
index a63a723c..31fbe484 100644
--- a/src/perl/irssi-core.pl
+++ b/src/perl/irssi-core.pl
@@ -13,13 +13,12 @@ sub is_static {
}
sub destroy {
- my $package = "Irssi::Script::".$_[0];
- delete_package($package);
+ delete_package($_[0]);
}
sub eval_data {
my ($data, $id) = @_;
- destroy($id);
+ destroy("Irssi::Script::$id");
my $package = "Irssi::Script::$id";
my $eval = qq{package $package; %s sub handler { $data; }};