Subject: | precedence error in Bio::DB::IndexedBase.pm |
Date: | Mon, 2 Apr 2018 21:12:47 +0000 |
To: | "bug-bioperl [...] rt.cpan.org" <bug-bioperl [...] rt.cpan.org> |
From: | John Macdonald <John.Macdonald [...] oicr.on.ca> |
In Bio::DB::IndexedBase.pm, line 845, there is the code:
return eval {
$self->_fhcache( File::Spec->catfile($self->{dirname}, $file));
} or $self->throw( "Can't open file $file" );
which gives a compiler warning:
Possible precedence issue with control flow operator at /oicr/local/boutroslab/sw/NightlyBuilds/2018-03-29/perl/Perl-BL-2018-03-29/lib/site_perl/5.26.0/Bio/DB/IndexedBase.pm line 845.
require Bio/DB/IndexedBase.pm called at /oicr/local/boutroslab/sw/NightlyBuilds/2018-03-29/perl/Perl-BL-2018-03-29/lib/5.26.0/base.pm line 100
The warning looks to be a genuine error - the throw will never be executed. Either there should be parens around eval {...} or $self->throw(...), or else the 'or' operator should be replaced with an '||' operator.
John Macdonald
Software Engineer
Ontario Institute for Cancer Research
MaRS Centre
661 University Avenue
Suite 510
Toronto, Ontario
Canada M5G 0A3
Tel:
Email: John.Macdonald@oicr.on.ca
Toll-free: 1-866-678-6427
Twitter: @OICR_news
www.oicr.on.ca<http://www.oicr.on.ca/>
This message and any attachments may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this message in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this message may not be that of the organization.