[Bioperl-l] How to get rid of warnings

Hilmar Lapp hlapp at gmx.net
Sat Aug 19 16:16:01 UTC 2006


Well, the rule would be:

	1) if a local (instance) verbosity has been set, use it
	2) otherwise, if a global (class, static) verbosity has been set,  
use it
	3) otherwise, use a default value.

This would mean indeed that if you changed verbosity for a specific  
instance it will be unaffected by global changes of the verbosity level.

If that doesn't sound good, you would reverse rules 1) and 2).

Or am I missing something?

	-hilmar

On Aug 19, 2006, at 9:19 AM, Sendu Bala wrote:

> Hilmar Lapp wrote:
>> There is a variable Bio::Root::VERBOSITY which is returned by
>> Bio::Root::Root::verbose() if called as a function (as opposed to a
>> method).
>>
>> The accompanying comment says that this would enable global verbosity
>> setting, but I don't see the piece of code that would actually set  
>> the
>> variable, let alone defaulting the per-instance value to it if a
>> different one was never set.
>>
>> I'm not sure whether I'm overlooking something (quite possible)  
>> but if
>> I'm not this sounds like a bug. Also, I thought that the value of  
>> some
>> environment variable would be taken into account but in the code I  
>> don't
>> see any indication of that being true either.
>>
>> If no-one sets me straight can you file this as a bug report?
>
> Well, there's nothing in the actual docs to say that this  
> functionality
> is present, so it's not really a bug that it doesn't work.
>
> A simple global verbosity variable is no good anyway. You want to be
> able to temporarily switch all objects warn behaviour, but then be  
> able
> to switch it back to whatever their verbosities were to begin with. If
> you just set Bio::Root::VERBOSITY to something, how would any method
> (ie. &warn) know if you wanted that verbosity to be used now all the
> time, or if the verbosity set on the root instance should be used? I
> suppose the default of it could be undef, and you set it back to undef
> when you don't want a global verbosity, but is that very nice?
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>

-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================








More information about the Bioperl-l mailing list