Skip Menu |

This queue is for tickets about the Perl-MinimumVersion CPAN distribution.

Report information
The Basics
Id: 95023
Status: resolved
Priority: 0/
Queue: Perl-MinimumVersion

People
Owner: NEILB [...] cpan.org
Requestors: paul [...] city-fan.org
Cc: ether [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.33
Fixed in: 1.35



Subject: t/02_main.t fails on perl < 5.10
$ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/01_compile.............ok t/02_main................ # Failed test 'correct version' # at t/02_main.t line 367. # got: '5.013010' # expected: '5.01301' # Looks like you failed 1 test of 119. dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 118 Failed 1/119 tests, 99.16% okay t/03_open_3arg...........ok t/04_substr..............ok t/05_foreach.............ok t/06_weaken..............ok t/07_splice..............ok t/08_mkdir...............ok t/09_pkg_name_version....ok t/10_yada_yada_yada......ok t/11_feature_bundle......ok t/12_double_colon........ok t/13_perl_510............ok t/14_regex...............ok t/15_each................ok t/16_binmode.............ok t/17_when................ok t/18_exists_subr.........ok t/19_opentemp............ok t/20_sort_subref.........ok t/21_openscalar..........ok t/22_while_readdir.......ok t/23_internals...........ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/02_main.t 1 256 119 1 0.84% 118 Failed 1/23 test scripts, 95.65% okay. 1/331 subtests failed, 99.70% okay. make: *** [test_dynamic] Error 255 Attached patch fixes this for me. Also, the perlver script is shipped in the 1.33 tarball but doesn't get installed; I guess that's not intentional?
Subject: Perl-MinimumVersion-1.33-perl58.patch
--- t/02_main.t +++ t/02_main.t @@ -366,7 +366,7 @@ $minver->_set_collect_all_reasons(); is( $minver->minimum_syntax_version, - '5.01301', + $] >= 5.010 ? '5.01301' : '5.013010', "correct version", ); is(
On 2014-04-24 15:13:54, paul@city-fan.org wrote: Show quoted text
> Also, the perlver script is shipped in the 1.33 tarball but doesn't > get installed; I guess that's not intentional?
[ExecDir] dir = script
is( $minver->minimum_syntax_version, - '5.01301', + $] >= 5.010 ? '5.01301' : '5.013010', "correct version", ); This is an odd change. Why would the version be coming out different in older perls?
From: paul [...] city-fan.org
On Thu Apr 24 18:29:39 2014, ETHER wrote: Show quoted text
> > is( > $minver->minimum_syntax_version, > - '5.01301', > + $] >= 5.010 ? '5.01301' : '5.013010', > "correct version", > ); > > This is an odd change. Why would the version be coming out different > in older perls?
Not sure, but Module-CoreList does something similar; see _create_aliases in Module::CoreList::Utils.
Show quoted text
> [ExecDir] > dir = script
Thanks Karen!
Thanks for reporting this. 1.34 is making its way onto CPAN: fixes both points you raised. Cheers, Neil
Properly fixed in 1.35
On 2014-04-24 15:36:03, paul@city-fan.org wrote: Show quoted text
> On Thu Apr 24 18:29:39 2014, ETHER wrote:
> > > > is( > > $minver->minimum_syntax_version, > > - '5.01301', > > + $] >= 5.010 ? '5.01301' : '5.013010', > > "correct version", > > ); > > > > This is an odd change. Why would the version be coming out different > > in older perls?
> > Not sure, but Module-CoreList does something similar; see > _create_aliases in Module::CoreList::Utils.
I can shed some more light into this now, as I've run into similar in Module-Metadata's tests -- older Test::More (before 0.95_01) handled overloaded objects differently when comparing in is(). This especially has impact when comparing a version.pm object to an expected numerical version. So, you may want to explicitly compare $version->version rather than letting Test::More try to figure out what to do.