[Bioperl-l] refactoring RootI

Jason Stajich jason@chg.mc.duke.edu
Tue, 16 Jan 2001 15:36:22 -0500


----- Original Message -----
From: "Hilmar Lapp" <hlapp@gmx.net>
To: "Ewan Birney" <birney@ebi.ac.uk>
Cc: <bioperl-l@bioperl.org>
Sent: Tuesday, January 16, 2001 2:02 PM
Subject: Re: [Bioperl-l] refactoring RootI


> Ewan Birney wrote:
> >
> > I have finished a very serious refactoring of RootI. This detaches
> > RootI from the other Root:: objects completely. verbose I think it
handled
> > nicer. I would venture to say that the code is more readable.
> >
> > I have changed the formatting somewhat of the stack trace in the
> > throw/warn statements. Your milage may vary here...
> >
> > Jason, Hilmar - check it out and tell me what you think.
> >
> > I am now a little exhausted although the final product I think is vastly
> > improved...
> >
>
> Well, that was a radical surgery :) Even though SteveC won't be
> excited about it, it looks we now have a relatively clear and
> straight code base there. It also seems that Err.pm is now
> superfluous, so we may want to deprecate it.

I am very impressed as well, it should be a lot simplier.  I did notice the
warn/throw changed to only accept 1 parameter while I think it accepted 2
before - 1st paramet was printed as
MSG: $_[0]
second as
NOTE: $_[1]

But I don't think it is seriously important.
>
> We should also build a test for $obj->throw(), that it really
> prints a meaningful stack trace. In addition, there should be a
> test demonstrating that $obj->verbose(2) really turns warn() into
> throw().

Did that in t/RootI.t I think, but it may not be extremely complete.  Tried
to make it catch all the thrown errors in eval, I didn't play with the
SIG{__WARN__} settings enough to try and catch errors on warn when verbose==
1.

>
> Hilmar
> --
> -----------------------------------------------------------------
> Hilmar Lapp                                email: hlapp@gmx.net
> GNF, San Diego, Ca. 92122                  phone: +1 858 812 1757
> -----------------------------------------------------------------
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>