diff options
Diffstat (limited to 'lib/Crawl/Bot/Plugin/Monster.pm')
-rw-r--r-- | lib/Crawl/Bot/Plugin/Monster.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Crawl/Bot/Plugin/Monster.pm b/lib/Crawl/Bot/Plugin/Monster.pm index 0c22a25..6140c70 100644 --- a/lib/Crawl/Bot/Plugin/Monster.pm +++ b/lib/Crawl/Bot/Plugin/Monster.pm @@ -30,7 +30,12 @@ sub get_monster_info { return "Error: Bad branch $branch\n" unless $branch =~ /^(trunk|stable)$/; - CORE::open(F, "-|", "bin/monster-$branch", $monster) or return undef; + CORE::open(F, "-|") || do { + # Collect stderr too + close STDERR; open STDERR, '>&STDOUT'; + exec "bin/monster-$branch", $monster or die "could not execute monster-$branch: $!"; + + }; local $/ = undef; my $resp = <F>; CORE::close(F); |