Subject: | Console command LEAKs fails without output if Devel::GC::Helper not installed |
If LEAKS is called from within the console and Devel::GC::Helper is not
installed, the command silently fails (although the logs will reveal
that the forked child died because of the missing module).
I'm attaching a small patch that wraps the require inside an eval, and
warns the user if D::GC::H is not installed.
Subject: | console.patch |
=== lib/AxKit2/Console.pm
==================================================================
--- lib/AxKit2/Console.pm (revision 766)
+++ lib/AxKit2/Console.pm (local)
@@ -287,7 +287,10 @@
die "Can't fork" unless defined $pid;
return if $pid;
- require Devel::GC::Helper;
+ eval { require Devel::GC::Helper } or
+ exit $self->write( "you need Devel::GC::Helper to be installed "
+ ."to run this command" );
+
if ($dump) {
require Data::Dumper;
$Data::Dumper::Terse = 1;