diff options
author | Tom Feist <shabble@metavore.org> | 2010-12-04 05:48:25 +0000 |
---|---|---|
committer | Tom Feist <shabble@metavore.org> | 2010-12-04 05:48:25 +0000 |
commit | 25152bc8bf6d2c4feaf211902fc9d6c9f992f274 (patch) | |
tree | 51699c14a3a01cdec615c88c2c1f625a1a09f96e /feature-tests/easy_exec.pl | |
parent | uberprompt: have the debug_prompt_changed handler added/removed appropriately (diff) | |
download | irssi-scripts-25152bc8bf6d2c4feaf211902fc9d6c9f992f274.tar.gz irssi-scripts-25152bc8bf6d2c4feaf211902fc9d6c9f992f274.zip |
easy_exec: override /script exec with a function to export all of the Irssi::
namespace functions for ease of testing.
Diffstat (limited to '')
-rw-r--r-- | feature-tests/easy_exec.pl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/feature-tests/easy_exec.pl b/feature-tests/easy_exec.pl new file mode 100644 index 0000000..76cd79f --- /dev/null +++ b/feature-tests/easy_exec.pl @@ -0,0 +1,25 @@ +use strict; +use warnings; + +use Irssi (@Irssi::EXPORT_OK); +use Irssi::Irc; +use Irssi::TextUI; + +use Data::Dumper; + +our $VERSION = '0.1'; +our %IRSSI = ( + authors => '', + contact => '', + name => '', + description => '', + license => 'Public Domain', + ); + +Irssi::signal_add_first 'command script exec', \&better_exec; + +sub better_exec { + my ($args, $serv, $witem) = @_; + eval $args; + Irssi::signal_stop(); +} |