[Bioperl-l] quiet() proposed for WrapperBase

Chris Fields cjfields at uiuc.edu
Tue Jan 2 12:45:41 EST 2007


> Hi,
> 
> I propose a quiet() method in Bio::Tools::Run::WrapperBase. A 
> number of wrapper modules 'implement' their own quiet() via 
> AUTOLOAD; this would be for use by wrappers not making use of 
> AUTOLOAD.
> 
> The code would be:
> 
> =head2 quiet
> 
>   Title   : quiet
>   Usage   : $factory->quiet(1);
>             if ($factory->quiet()) { ... }
>   Function: Get/set the quiet state. Can be used by wrappers 
> to control if
>             program output is printed to the console or not.
>   Returns : boolean
>   Args    : none to get, boolean to set
> 
> =cut
> 
> sub quiet {
>      my $self = shift;
>      if (@_) { $self->{quiet} = shift }
>      return $self->{quiet} || 0;
> }
> 
> 
> This method would get used instead of the AUTOLOAD version in 
> most wrappers, but I don't think any behaviour different will result.
> 
> Any objections?

No problem with me.  On less AUTOLOAD'ed sub to worry about!

chris



More information about the Bioperl-l mailing list