diff options
Diffstat (limited to '_testing')
| -rw-r--r-- | _testing/_irssi_test.pl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/_testing/_irssi_test.pl b/_testing/_irssi_test.pl index aeeb1d1..f1eb998 100644 --- a/_testing/_irssi_test.pl +++ b/_testing/_irssi_test.pl @@ -15,7 +15,12 @@ Irssi::command('^window log on'); Irssi::command("script load $CURRENT_SCRIPT"); Irssi::command('^window log off'); -my ($package) = grep { !/^_/ } keys %Irssi::Script::; +my (@packages) = grep { !/^_/ } keys %Irssi::Script::; +my $tp = $CURRENT_SCRIPT; $tp =~ s/^.*\///; $tp =~ s/\W/_/g; my @tmp; +if ((@tmp = grep /^\Q$tp\E::/, @packages) or (@tmp = grep /^\Q$tp\E/, @packages)) { + @packages = @tmp; +} +my ($package) = @packages; require YAML::Tiny; YAML::Tiny->VERSION("1.59"); |
