Skip Menu |

This queue is for tickets about the Rapid7-NeXpose-API CPAN distribution.

Report information
The Basics
Id: 75227
Status: new
Priority: 0/
Queue: Rapid7-NeXpose-API

People
Owner: Nobody in particular
Requestors: jaldridge [...] tanagerinc.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.03
Fixed in: (no value)



Subject: Debug initialization problem
When setting a debug value in the call to "new", a run time error occurred for numeric comparison involving an empty string. I was able to correct this (perhaps not optimally) by setting a default value in "new" ahead of "$self->{'_debug'} = 0 unless defined $cnf{'debug'};". Once this was added, a compilation error occurred complaining that "lwpdebug" was not blessed, which was easily corrected by moving the bless statement ahead of the "if" block for "$self->lwpdebug();". The resulting code segment from "new" appears as follows: #################################################### $self->{'_debug'} = 4; $self->{'_debug'} = 0 unless defined $cnf{'debug'}; $self->{_ua} = LWP::UserAgent->new; bless $self, $class; if ($self->{'_debug'}) { $self->lwpdebug(); } #################################################### Once these changes were made, the debug mode worked in a useful manner. My Perl version: v5.10.1 (*) built for i686-cygwin-thread-multi-64int uname -a: CYGWIN_NT-5.1 sysl930 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin