[Bioperl-l] Re: Bio::Root::Root::new()
Hilmar Lapp
hlapp@gnf.org
Mon, 9 Dec 2002 10:04:04 -0800
-verbose isn't that important, I just thought it's a good idea to
try to rescue it because sometimes parent classes might add a
-verbose flag when the descendant class only passes a single
argument or so.
I don't think we should throw() here -- there are some classes which
accept unnamed parameters, which makes sense if there can only be a
single parameter for instance. If we decide to throw upon uneven
number of arguments, at the very least I'd have to go over a whole
bunch of older bioperl-db classes, and I'm not convinced this is
worth the effort.
-hilmar
On Monday, December 9, 2002, at 05:57 AM, Heikki Lehvaslaiho wrote:
>
> Hi Hilmar,
>
> You fixed the Root new method three weeks ago. Now if an odd number of
> arguments is passed to the constructor, it does not complain but tries
> to set verbose() on. I do not understand why verbose is important?
> Wouldn't it make more sense to throw?
>
> shift if @_ % 2;
> =>
> $self->throw("Uneven number of arguments ". join(", ") @_) if @_ $ 2;
>
> -Heikki
>
> --
> ______ _/ _/_____________________________________________________
> _/ _/ http://www.ebi.ac.uk/mutations/
> _/ _/ _/ Heikki Lehvaslaiho heikki@ebi.ac.uk
> _/_/_/_/_/ EMBL Outstation, European Bioinformatics Institute
> _/ _/ _/ Wellcome Trust Genome Campus, Hinxton
> _/ _/ _/ Cambs. CB10 1SD, United Kingdom
> _/ Phone: +44 (0)1223 494 644 FAX: +44 (0)1223 494 468
> ___ _/_/_/_/_/________________________________________________________
>
>
--
-------------------------------------------------------------
Hilmar Lapp email: lapp at gnf.org
GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
-------------------------------------------------------------