Skip Menu |

This queue is for tickets about the Test-AutoLoader CPAN distribution.

Report information
The Basics
Id: 77942
Status: new
Priority: 0/
Queue: Test-AutoLoader

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc: gregoa [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.03
Fixed in: (no value)



Subject: Tests fails wtih perl 5.16.0 becuse the autosplitted al files does not exist anymore
Tests that expects pass fails with perl 5.16.0: # Failed test 'subtest 'Autoload of POSIX (all files)' of 'Standard-distribution module, all files' compare ok' # at t/00basic.t line 68. # got: '0' # expected: '1' # Failed test 'subtest 'Autoload of POSIX (listed subroutines)' of 'Standard-distribution module, one file' compare ok' # at t/00basic.t line 68. # got: '0' # expected: '1' # Looks like you failed 2 tests of 64. This is because the autoload_ok() checks for autosplited files, e.g. auto/POSIX/strcpy.al, which are not generated by perl 5.16.0.
From: ppisar [...] redhat.com
Show quoted text
> This is because the autoload_ok() checks for autosplited files, e.g. > auto/POSIX/strcpy.al, which are not generated by perl 5.16.0.
perldelta <http://search.cpan.org/dist/perl-5.16.0/pod/perldelta.pod> says: POSIX no longer uses AutoLoader. Any code which was relying on this implementation detail was buggy, and may fail because of this change. Not using AutoLoader is the reason why the al files are missing.
From: ppisar [...] redhat.com
Show quoted text
> This is because the autoload_ok() checks for autosplited files, e.g. > auto/POSIX/strcpy.al, which are not generated by perl 5.16.0.
Attached patch skips the two test on perl 5.16 and newer.
Subject: Test-AutoLoader-0.03-Skip-POSIX-tests-with-perl-5.16.patch
From 7f347d684936c6108e658ba6c12e43b7e62562f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Thu, 21 Jun 2012 10:49:01 +0200 Subject: [PATCH] Skip POSIX tests with perl 5.16 --- t/00basic.t | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/t/00basic.t b/t/00basic.t index 94f1a4f..462d8e0 100644 --- a/t/00basic.t +++ b/t/00basic.t @@ -35,6 +35,7 @@ require EmptyModule; my @unreadable = (File::Spec->catdir(qw(tlib auto TestBusted1)), File::Spec->catfile(qw(tlib auto TestBusted2 no_ready.al))); my $CAN_CHMOD = chmod 0000, @unreadable; +my $POSIX_USES_AUTOLOAD = $^V lt v5.16.0; my $file_errors; $file_errors .=<<DIAG if $CAN_CHMOD; couldn't load no_ready.al: Permission denied @@ -46,8 +47,6 @@ DIAG my @tests = ( - [ ['POSIX'],{ok=>1,name=>"Autoload of POSIX (all files)"},"Standard-distribution module, all files"], - [ [qw(POSIX strcpy)],{ok=>1,name=>"Autoload of POSIX (listed subroutines)"},"Standard-distribution module, one file"], [ [qw(POSIX no_such_function)], {ok=>0,diag=>" couldn't load no_such_function.al: No such file or directory"}, "Standard-distribution, bad subroutine name"], [ [qw(strict)], {ok=>0,diag=>"Unable to find valid autoload directory for strict"}, "Non-existent auto directory"], [ [qw(EmptyModule)], {ok=>0,diag=>"No autoloaded files found"}, "No files in auto directory"], @@ -59,6 +58,14 @@ my @tests = ( ); +if ($POSIX_USES_AUTOLOAD) { + push @tests, + [ ['POSIX'],{ok=>1,name=>"Autoload of POSIX (all files)"},"Standard-distribution module, all files"], + [ [qw(POSIX strcpy)],{ok=>1,name=>"Autoload of POSIX (listed subroutines)"},"Standard-distribution module, one file"]; +} else { + SKIP:{skip "POSIX module does not use AutoLoader",12} +} + if ($CAN_CHMOD) { push @tests, [ [qw(TestBusted1)], {ok=>0,diag=>"Unable to find valid autoload directory for TestBusted1"}, "Unreadable auto directory"], -- 1.7.7.6