From 42e4d2b23759185fa0d32decab19c95614e91e03 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Sun, 9 Jan 2011 21:46:51 +0000 Subject: some dirty hacks to make the package appear as an internal module, LeoNerd++ --- feature-tests/format-test.pl | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'feature-tests/format-test.pl') diff --git a/feature-tests/format-test.pl b/feature-tests/format-test.pl index d8be412..2c99d50 100644 --- a/feature-tests/format-test.pl +++ b/feature-tests/format-test.pl @@ -14,13 +14,21 @@ our %IRSSI = ( license => 'Public Domain', ); -init(); +sub actually_printformat { + my ($win, $level, $module, $format, @args) = @_; + { + # deeeeeeep black magic. + local *CORE::GLOBAL::caller = sub { $module }; + $win->printformat($level, $format, @args); + } -sub init { - Irssi::command_bind('ft', \&format_test); } +init(); + +sub init { + my $win = Irssi::active_win(); + actually_printformat($win, Irssi::MSGLEVEL_CLIENTCRAP, 'fe-common/irc', + "kill_server", "foo", "bar", "horse", "cake"); -sub format_test { - my ($args, $win, $server) = @_; } -- cgit v1.2.3