[Bioperl-l] global verbosity

Mark A. Jensen maj at fortinbras.us
Thu Dec 4 10:37:19 EST 2008

----- Original Message ----- 
From: "Hilmar Lapp" <hlapp at gmx.net>
To: "Mark A. Jensen" <maj at fortinbras.us>
Cc: <bioperl-l at lists.open-bio.org>
Sent: Thursday, December 04, 2008 10:09 AM
Subject: Re: [Bioperl-l] global verbosity

> But I like your patch in that it enables a static method call to set  the 
> global default. [thanks!] Except the line
> +    $self->{'_root_verbose'} = $VERBOSITY;
> +    # now look for flag and update if nec...
> Doesn't that override any previously set value to the global default?  I.e., I 
> don't think the above would pass
> $seq->verbose(1);
> ok ($seq->verbose(), 1);
> Or am I missing something?

Maybe the patch is confusing-- that line is in the Root constructor, not in 
so this should be the first verbosity the object sees. Clearly, would be naughty 
in the verbose
method. The rest of the patch is in verbose(). (Now am I missing sth?)

>> There is a stickier issue (example using Bio::Seq and
>> Bio::Seq->primary_seq() in the .t file), in which
>> setting an object's verbosity post-construction does not propagate to
>> sub-objects contained in the object, so that one might not get what
>> one expects.
> I think the run-time changing for an object not propagating to sub- objects is 
> expected behavior. It would also be very difficult to solve  this cleanly, as 
> you would either have to expect derived objects to  override some method to 
> inject their own sub-objects into the chain,  or you would need base objects 
> to have knowledge about what their  derivatives do.

I agree. As I commented at the patch, I do think that certain properties (not 
nec. methods
or subobjects) should be passed down to naturally derived objects if the 
referring object
desires is (e.g., a LocatableSeq slice should probably have the same primary id 
as the
original sequence). I took a stab at this in Bug #2673.

> For our records I responded that to the patch as well.
> -hilmar
> -- 
> ===========================================================
> : Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
> ===========================================================

cheers - MAJ 

More information about the Bioperl-l mailing list