aboutsummaryrefslogtreecommitdiffstats
path: root/ido-mode/ido_switcher.pl
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-04-01 05:43:04 +0000
committerTom Feist <shabble@metavore.org>2011-04-01 05:43:04 +0000
commit8a8ba2c51eadbc0a7ce0236ba6a04dd081f657e2 (patch)
tree2acdb32ce10869db315e2b045b272def5a1ca60c /ido-mode/ido_switcher.pl
parentsignal_redir: general cleanup, and added attribution block %IRSSI (diff)
downloadirssi-scripts-8a8ba2c51eadbc0a7ce0236ba6a04dd081f657e2.tar.gz
irssi-scripts-8a8ba2c51eadbc0a7ce0236ba6a04dd081f657e2.zip
modify all scripts to use the new script_is_loaded() function, since newer
versions of perl get upset at defined(%hash).
Diffstat (limited to 'ido-mode/ido_switcher.pl')
-rw-r--r--ido-mode/ido_switcher.pl12
1 files changed, 3 insertions, 9 deletions
diff --git a/ido-mode/ido_switcher.pl b/ido-mode/ido_switcher.pl
index 91da08b..e5c5447 100644
--- a/ido-mode/ido_switcher.pl
+++ b/ido-mode/ido_switcher.pl
@@ -250,15 +250,9 @@ sub print_all_matches {
#_print("Longtest name: $longest_name");
}
- sub script_is_loaded {
- my $name = shift;
- _debug_print "Checking if $name is loaded";
- no strict 'refs';
- my $retval = defined %{ "Irssi::Script::${name}::" };
- use strict 'refs';
-
- return $retval;
- }
+sub script_is_loaded {
+ return exists($Irssi::Script::{shift . '::'});
+}
unless (script_is_loaded('uberprompt')) {