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). --- history-search/rl_history_search.pl | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'history-search') diff --git a/history-search/rl_history_search.pl b/history-search/rl_history_search.pl index ca45fe5..642b99c 100644 --- a/history-search/rl_history_search.pl +++ b/history-search/rl_history_search.pl @@ -81,13 +81,7 @@ sub DEBUG () { $DEBUG_ENABLED } # check we have uberprompt 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 . '::'}) ; } if (not script_is_loaded('uberprompt')) { @@ -103,7 +97,7 @@ if (not script_is_loaded('uberprompt')) { } history_init(); } else { - history_init(); + history_init(); } sub load_uberprompt_failed { -- cgit v1.2.3