Skip Menu |
Report information
Id: 1012
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: schwern <schwern [at] pobox.com>
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: (no value)
Severity: medium
Type: unknown
Perl Version: (no value)
Fixed In: (no value)



Date: Sun, 18 Jul 1999 22:11:00 -0400
From: Michael G Schwern <schwern [...] pobox.com>
To: perlbug [...] perl.org, perl5-porters [...] perl.org
Subject: [PATCH ExtUtils::MM_Unix] naughty behavior in parse_file()
Package namespace installed latest in CPAN file AutoLoader undef 5.56 CHIPS/perl5.004_05.tar.gz Could not eval ' package ExtUtils::MakeMaker::_version; no strict; local $VERSION; $VERSION=undef; do { $VERSION = _version(); }; $VERSION ' in /home/schwern/lib/perl5/site_perl/5.005/Bio/Index/EMBL.pm: Undefined subroutine &ExtUtils::MakeMaker::_version::_version called at (eval 234) line 7, <FH> chunk 103. Lovely, ain't it? The failure comes because Bio::Index::EMBL does the following: sub _version { return 0.1; } $VERSION = _version(); And parse_version() only sees "$VERSION = _version();". As Bio::Index::EMBL::_version hasn't been loaded, the eval fails. Now, I have no idea how to improve parse_version to fix this, but I -do- know that it shouldn't -die- upon failing to eval. I've switched the eval to a warning and added a smidge more documentation to parse_version. I've also mentioned this to the bioperl developers and recommended they alter the way they set $VERSION so that parse_version can see it. *** lib/ExtUtils/MM_Unix.pm 1999/07/19 01:37:56 --- lib/ExtUtils/MM_Unix.pm 1999/07/19 01:56:40 *************** *** 2564,2570 **** =item parse_version ! parse a file and return what you think is $VERSION in this file set to =cut --- 2564,2571 ---- =item parse_version ! parse a file and return what you think is $VERSION in this file set to. ! It will return undef if it can't figure out what $VERSION is. =cut *************** *** 2592,2598 **** }; local($^W) = 0; $result = eval($eval); ! die "Could not eval '$eval' in $parsefile: $@" if $@; $result = "undef" unless defined $result; last; } --- 2593,2599 ---- }; local($^W) = 0; $result = eval($eval); ! warn "Could not eval '$eval' in $parsefile: $@" if $@; $result = "undef" unless defined $result; last; }


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org