[Bioperl-l] How to get rid of warnings
Sendu Bala
bix at sendu.me.uk
Sat Aug 19 13:19:49 UTC 2006
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?
More information about the Bioperl-l
mailing list