Please confirm bug in SHLOMIF > Error-0.17 > Error

Discussion in 'Perl Misc' started by Derek Basch, Jul 27, 2006.

  1. Derek Basch

    Derek Basch Guest

    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
    Derek Basch, Jul 27, 2006
    #1
    1. Advertising

  2. Derek Basch

    Derek Basch Guest

    Re: Please confirm bug in SHLOMIF > Error-0.17 > Error

    Thanks for the help. I am sorry I didn't expand my examples enough. I
    certainly wasn't hoping to find a bug but rather trying to figure out
    something that had been "bugging" me for many hours. I will submit this
    to CPAN.

    Thanks,
    Derek Basch
    Derek Basch, Jul 27, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bryan Martin

    Confirm a bug.....

    Bryan Martin, Nov 23, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    403
    Bryan Martin
    Nov 23, 2003
  2. Ian
    Replies:
    0
    Views:
    287
  3. KK
    Replies:
    2
    Views:
    545
    Big Brian
    Oct 14, 2003
  4. Roger Binns
    Replies:
    3
    Views:
    334
    Roger Binns
    Jun 24, 2004
  5. =?ISO-8859-1?Q?G=E9rard_Talbot?=

    Confirm a serious CSS bug in IE 7 (infinite loop)

    =?ISO-8859-1?Q?G=E9rard_Talbot?=, Mar 11, 2007, in forum: HTML
    Replies:
    0
    Views:
    282
    =?ISO-8859-1?Q?G=E9rard_Talbot?=
    Mar 11, 2007
Loading...

Share This Page