From 8a8ba2c51eadbc0a7ce0236ba6a04dd081f657e2 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Fri, 1 Apr 2011 06:43:04 +0100 Subject: modify all scripts to use the new script_is_loaded() function, since newer versions of perl get upset at defined(%hash). --- scrolled-reminder/scrolled_reminder.pl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'scrolled-reminder') diff --git a/scrolled-reminder/scrolled_reminder.pl b/scrolled-reminder/scrolled_reminder.pl index 48da622..21fab26 100644 --- a/scrolled-reminder/scrolled_reminder.pl +++ b/scrolled-reminder/scrolled_reminder.pl @@ -82,13 +82,7 @@ our %IRSSI = # check we have prompt_info loaded. sub script_is_loaded { - my $name = shift; - print "Checking if $name is loaded" if DEBUG; - no strict 'refs'; - my $retval = defined %{ "Irssi::Script::${name}::" }; - use strict 'refs'; - - return $retval; + return exists($Irssi::Script::{shift . '::'}) ; } unless (script_is_loaded('uberprompt')) { -- cgit v1.2.3 From 9b4f3c204419e20bcb470b8aa04a6ffb4e35fdfb Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Fri, 1 Apr 2011 07:26:42 +0100 Subject: Bah. more fixing of script_is_loaded. --- scrolled-reminder/scrolled_reminder.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scrolled-reminder') diff --git a/scrolled-reminder/scrolled_reminder.pl b/scrolled-reminder/scrolled_reminder.pl index 21fab26..efe6630 100644 --- a/scrolled-reminder/scrolled_reminder.pl +++ b/scrolled-reminder/scrolled_reminder.pl @@ -82,7 +82,7 @@ our %IRSSI = # check we have prompt_info loaded. sub script_is_loaded { - return exists($Irssi::Script::{shift . '::'}) ; + return exists($Irssi::Script::{$_[0] . '::'}) ; } unless (script_is_loaded('uberprompt')) { -- cgit v1.2.3