[Bioperl-guts-l] [Bug 1907] New: SimpleValue: /qualifier="0" becomes /qualifier=""

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Thu Nov 17 05:08:22 EST 2005


           Summary: SimpleValue: /qualifier="0" becomes /qualifier=""
           Product: Bioperl
           Version: 1.5 branch
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Bio::SeqIO
        AssignedTo: bioperl-guts-l at bioperl.org
        ReportedBy: pjm at sanger.ac.uk

I have stumbled on a problem when writing out an EMBL file. If my input

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 || ''};

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";

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the Bioperl-guts-l mailing list