[Bioperl-l] How to get rid of warnings
bix at sendu.me.uk
Sat Aug 19 14:07:49 EDT 2006
Hilmar Lapp wrote:
> 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).
But then if you set the global verbosity how do you later change your
mind, unset it, and go back to using instance verbosity?
> Or am I missing something?
Well, assuming we would prefer global changes to really be global
changes, and we reversed 1) and 2), if we have just a single simple
global variable, how does a method like &warn even know that it is 'set'
(and not still on its default value)? How does it know when it is unset
(we no longer want a globally acting verbosity)?
Like I say, you have to have a default of undef and set the value to
undef to turn the feature off, which doesn't seem very nice to me.
I'd prefer to be able to chose a global verbosity level and
independently turn global behaviour on and off by supplying a method a
boolean or even the words 'on'|'off', not supplying int or undef.
More information about the Bioperl-l