From: | Michael Cartmell <michael.cartmell [...] lawpoint.com.au> |
To: | "'bug-class-returnvalue [...] rt.cpan.org'" <bug-class-returnvalue [...] rt.cpan.org> |
Subject: | Class::ReturnValue |
Date: | Wed, 31 Jul 2002 09:48:43 +1000 |
Hi,
I've been looking at this module & it seems quite usefull. There does seem
to be a problem with giving an errno of 0. If I have
$ret->return_error (
message => "Copied $count files",
errno => 0,
do_backtrace => 0
);
I get the following on stderr.
1 -> return_error called without an 'errno' parameter at ./a.pl line 7
I don't think I should get an error message & the error message is slightly
cryptic. What is the "1" refering to?
The following patch fixes those two problems. (I hope I got the patch
right, I've not created one before).
*** lib/Class/ReturnValue.pm Wed Jul 31 09:28:20 2002
--- lib/Class/ReturnValue.pm.orig Wed Jul 31 09:30:18 2002
***************
*** 212,219 ****
do_backtrace => 1,
@_);
! unless(defined $args{'errno'}) {
! carp "\$self -> return_error called without an 'errno' parameter";
return (undef);
}
--- 212,219 ----
do_backtrace => 1,
@_);
! unless($args{'errno'}) {
! carp "$self -> return_error called without an 'errno' parameter";
return (undef);
}
Michael Cartmell
Network & Operating Systems Analyst
Lawpoint Pty. Limited
Phone +612 9239 4958
Fax +612 9239 4900
E-mail michael.cartmell@lawpoint.com.au
Message body is not shown because sender requested not to inline it.