D
Derek Basch
Hello Everyone,
I was hoping someone could confirm a bug for me. I believe I have found
a bug in the Error module. The Synopsis section shows this example:
throw Error::Simple -text => "Oops!" if $other_condition;
However, this style of instantiating a Error::Simple object is broken.
The constructor for Error::Simple does not convert the parameters array
into a hash as expected:
265 sub new {
266 my $self = shift;
267 my $text = "" . shift;
268 my $value = shift;
269 my(@args) = ();
I believe it should be:
265 sub new {
266 my (%params) = @_;
and the parameters should be dereferenced as hash elements throughout.
Can anyone confirm?
Thanks,
Derek Basch
I was hoping someone could confirm a bug for me. I believe I have found
a bug in the Error module. The Synopsis section shows this example:
throw Error::Simple -text => "Oops!" if $other_condition;
However, this style of instantiating a Error::Simple object is broken.
The constructor for Error::Simple does not convert the parameters array
into a hash as expected:
265 sub new {
266 my $self = shift;
267 my $text = "" . shift;
268 my $value = shift;
269 my(@args) = ();
I believe it should be:
265 sub new {
266 my (%params) = @_;
and the parameters should be dereferenced as hash elements throughout.
Can anyone confirm?
Thanks,
Derek Basch