aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode/vim_mode.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 /vim-mode/vim_mode.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 '')
-rw-r--r--vim-mode/vim_mode.pl8
1 files changed, 1 insertions, 7 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index 551fbb6..2916ca9 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -615,13 +615,7 @@ my $completion_active = 0;
my $completion_string = '';
sub script_is_loaded {
- my $name = shift;
- print "Checking if $name is loaded" if DEBUG;
- no strict 'refs';
- my $retval = %{ "Irssi::Script::${name}::" };
- use strict 'refs';
-
- return $retval;
+ return exists($Irssi::Script::{shift . '::'});
}
vim_mode_init();