use_if_available fails on activestate win32 #1

Closed
jberger opened this Issue Jan 15, 2012 · 4 comments

Comments

Projects
None yet
2 participants
Owner

jberger commented Jan 15, 2012

From: SLAFFAN @t cpan d0t org
Via RT: Bug 74005 https://rt.cpan.org/Public/Bug/Display.html?id=74005

Thanks for the module, but unfortunately it has test errors for win32
ActivePerl.

See attached cpanm build log for details.

Regards,
Shawn.

== relevant test failures ==

#   Failed test 'Loads Net::FTP from scalar'
#   at t/use_if_available.t line 58.

#   Failed test 'Net::FTP statement in variable'
#   at t/use_if_available.t line 59.
#                   'use_if_available got: use_if_available $core;
# use_if_available returned: use_if_available ;
# use_if_available got: use_if_available $bad;
# use_if_available returned: use_if_available ;
# use_if_available got: use_if_available $non_core;
# use_if_available returned: use_if_available ;
# use_if_available got: use_if_available $version_ok 0.01;
# use_if_available returned: use_if_available ;
# use_if_available got: use_if_available $version_bad 999;
# use_if_available returned: use_if_available ;
# use_if_available got: use_if_available $version_ok_import 0.01 qw/croak/;
# use_if_available returned: use_if_available  qw/croak/;
# use_if_available got: use_if_available $version_bad_import 999 qw/dualvar/;
# use_if_available returned: use_if_available  qw/dualvar/;
# '
#     doesn't match '(?^:Net::FTP)'

#   Failed test 'Loads Pod::Parser with version'
#   at t/use_if_available.t line 61.

#   Failed test 'Pod::Parser (with version) statement in variable'
#   at t/use_if_available.t line 62.
#                   'use_if_available got: use_if_available $core;
# use_if_available returned: use_if_available ;
# use_if_available got: use_if_available $bad;
# use_if_available returned: use_if_available ;
# use_if_available got: use_if_available $non_core;
# use_if_available returned: use_if_available ;
# use_if_available got: use_if_available $version_ok 0.01;
# use_if_available returned: use_if_available ;
# use_if_available got: use_if_available $version_bad 999;
# use_if_available returned: use_if_available ;
# use_if_available got: use_if_available $version_ok_import 0.01 qw/croak/;
# use_if_available returned: use_if_available  qw/croak/;
# use_if_available got: use_if_available $version_bad_import 999 qw/dualvar/;
# use_if_available returned: use_if_available  qw/dualvar/;
# '
#     doesn't match '(?^:Pod::Parser)'

#   Failed test 'Imports croak (with version)'
#   at t/use_if_available.t line 66.

#   Failed test 'loaded core module returns numerical value'
#   at t/use_if_available.t line 69.

#   Failed test 'Loads non-core module (ActivePerl::CPAN::Config)'
#   at t/use_if_available.t line 77.
# Looks like you failed 7 tests of 14.
t/use_if_available.t .. 
Dubious, test returned 7 (wstat 1792, 0x700)
Failed 7/14 subtests 

Test Summary Report
-------------------
t/use_if_available.t (Wstat: 1792 Tests: 14 Failed: 7)
  Failed tests:  3-6, 8, 10, 14
  Non-zero exit status: 7
Files=6, Tests=23, 13 wallclock secs ( 0.05 usr +  0.03 sys =  0.08 CPU)
Result: FAIL
Failed 1/6 test programs. 7/23 subtests failed.

@ghost ghost assigned jberger Jan 15, 2012

Owner

jberger commented Jan 15, 2012

Hmmm this looks to stem from find_module_version on Windows somehow. Since I don't use W I will need to rely on outside testers. I am building in additional warnings and will release as a dev version to see what I can find out.

jberger added a commit that referenced this issue Jan 15, 2012

In regards to issue #1: Added additional debugging messages, fixed te…
…sts to accomodate the new messages, bump version for dev release
Owner

jberger commented Jan 16, 2012

@shawnlaffan, if you install this dev version, could you let me know what the error messages are? Thanks

Here's the results of a prove run using a clone of the repo (see below). It's now passing tests 4 and 6.

I also ran it for a linux ActivePerl (5.12.3). It passes all tests except 14. This was again using a repo clone, as the cpan install also failed test 14.

I don't get any of the problems with the standard Ubuntu perl (5.10.1).

With a bit of digging it seems the use_if_available calls in lines 45-48 are having no effect, as %INC does not contain the valid modules afterwards.

Running a debugger session with a breakpoint at line 45 breaks on win32, but not under linux. It's speculation, but possibly use_if_available is being called at runtime on win32 and compile time on linux?

Shawn.

t\00-use.t ............ ok
t\import.t ............ ok
t\import_all.t ........ ok
t\import_other.t ...... ok
t\use_from.t .......... ok
t\use_if_available.t .. 1/?

Failed test 'Loads Net::FTP from scalar'

at t\use_if_available.t line 58.

Failed test 'Loads Pod::Parser with version'

at t\use_if_available.t line 61.

Failed test 'Imports croak (with version)'

at t\use_if_available.t line 66.

Failed test 'loaded core module returns numerical value'

at t\use_if_available.t line 69.

Failed test 'Loads non-core module (ActivePerl::CPAN::Config)'

at t\use_if_available.t line 77.

Looks like you failed 5 tests of 14.

t\use_if_available.t .. Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/14 subtests

Test Summary Report

t\use_if_available.t (Wstat: 1280 Tests: 14 Failed: 5)
Failed tests: 3, 5, 8, 10, 14
Non-zero exit status: 5
Files=6, Tests=23, 36 wallclock secs ( 0.09 usr + 0.02 sys = 0.11 CPU)
Result: FAIL

Owner

jberger commented Aug 13, 2016

This module has been removed from CPAN and is considered both silly and dangerous. Therefore I'm closing this issue.

@jberger jberger closed this Aug 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment