From 4509bc03728b2a38618ccd99e6fc4dd511775d96 Mon Sep 17 00:00:00 2001 From: Chris Fields Date: Fri, 9 Aug 2013 14:03:06 -0500 Subject: [PATCH] move hard-coded FT line length to a global --- Bio/SeqIO/genbank.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Bio/SeqIO/genbank.pm b/Bio/SeqIO/genbank.pm index e4ccc1ee0..9189fd749 100644 --- a/Bio/SeqIO/genbank.pm +++ b/Bio/SeqIO/genbank.pm @@ -192,6 +192,9 @@ use base qw(Bio::SeqIO); # Note that a qualifier that exceeds one line (i.e. a long label) will # automatically be quoted regardless: + +our $FTQUAL_LINE_LENGTH = 60; + our %FTQUAL_NO_QUOTE = map {$_ => 1} qw( anticodon citation codon codon_start @@ -1133,7 +1136,7 @@ sub _print_GenBank_FTHelper { # are more common too so we take quoted ones first # # Long qualifiers, that will be line wrapped, are always quoted - elsif (!$FTQUAL_NO_QUOTE{$tag} or length("/$tag=$value")>=60) { + elsif (!$FTQUAL_NO_QUOTE{$tag} or length("/$tag=$value") >= $FTQUAL_LINE_LENGTH) { my ($pat) = ($value =~ /\s/ ? '\s|$' : '.|$'); $self->_write_line_GenBank_regex(" "x21, " "x21, -- 2.11.4.GIT