[Bioperl-l] Bio::Annotation::SimpleValue

Brian Osborne osborne1 at optonline.net
Wed Nov 16 16:39:34 EST 2005


Paul,

Can you submit exactly what you've written below as a bug? The page is
http://bugzilla.bioperl.org. If you submit it it's sure to be addressed,
otherwise it may get lost in the email stream.

Thank you,

Brian O.



On 11/16/05 4:03 PM, "Paul Mooney" <pjm at sanger.ac.uk> wrote:

> Hi,
> 
> I have stumbled on a problem when writing out an EMBL file. If my input
> is;
> 
> FT   repeat_region   5..963
> FT                   /colour="0"
> 
> when I try to write it out I get
> 
> FT   repeat_region   5..963
> FT                   /colour=""
> 
> I think this is down to Bio::Annotation::SimpleVal doing a 'truth test'
> on the value of the qualifier (zero is false), hence I get an empty
> string. The code in SimpleValue.pm is;
> 
> use overload '""' => sub { $_[0]->value || ''};
> 
> Thanks,
> Paul.
> 
> PS, its the same on 1.5.1 and live. Heres a simple test;
> 
> use strict;
> use Bio::Annotation::SimpleValue;
> 
> my $simple = Bio::Annotation::SimpleValue->new(
>                                                -tagname => 'colour',
>                                                -value   => '0',
>                                                );
> print "SimpleValue = $simple\n";
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list