Subject: | changes for perl5.12 |
i made the following changes to go-perl 0.11 to get a silent "make test"
under perl 5.12.1
maybe it coukd be done more elegantly, but it seems to work.
and imho the changes would be good for 5.10, 5.8, ... as well
--- GO/Handlers/obj.pm 2010-05-12 21:16:49.000000000 +0200
+++ GO/Handlers/obj.pm 2010-05-31 14:43:10.082175949 +0200
@@ -186,7 +186,7 @@
my $synstr = stag_get($sn, SYNONYM_TEXT);
my $type = stag_find($sn, 'scope');
my @xrefs = stag_get($sn, DBXREF);
- $term->add_synonym_by_type(lc($type), $synstr);
+ $term->add_synonym_by_type($type ? lc($type) : '', $synstr);
# $term->add_definition_dbxref($_) foreach @xrefs;
}
elsif ($k eq ALT_ID) {
--- GO/Handlers/prolog.pm 2010-05-12 21:20:59.000000000 +0200
+++ GO/Handlers/prolog.pm 2010-05-31 15:19:48.076175988 +0200
@@ -114,9 +114,9 @@
$self->factq( holds_over_chain=>[$id,\@rels]);
}
}
- my @relchains = $typedef->get_equivalent_to_chain;
- foreach my $relchain (@relchains) {
- my @rels = $relchain->get_relation;
+ my @relchains2 = $typedef->get_equivalent_to_chain;
+ foreach my $relchain2 (@relchains) {
+ my @rels = $relchain2->get_relation;
if (@rels) {
$self->factq( equivalent_to_chain=>[$id,\@rels]);
}
--- GO/Parsers/obo_text_parser.pm 2010-05-12 21:21:29.000000000 +0200
+++ GO/Parsers/obo_text_parser.pm 2010-05-31 14:51:50.419175893 +0200
@@ -563,8 +563,8 @@
my ($extr, $rem, $prefix) = extract_quotelike($str);
my $txt = $extr;
- $txt =~ s/^\"//;
- $txt =~ s/\"$//;
+ $txt =~ s/^\"// if $txt;
+ $txt =~ s/\"$// if $txt;
if ($prefix) {
warn("illegal prefix: $prefix in: $str");
}
@@ -595,7 +595,7 @@
@parts =
map {split_on_comma($_)} @parts;
- $txt =~ s/\\//g;
+ $txt =~ s/\\//g if $txt;
return ($txt, \@parts, \@extra);
}