Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 17375
Status: resolved
Priority: 0/
Queue: Test-Pod

People
Owner: Nobody in particular
Requestors: cpan [...] pjedwards.co.uk
Cc:
AdminCc:

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



Subject: Test::Pod 1.22 PATCH for VMS
VMS directory structure is very different to anything else. (See: http://perldoc.perl.org/perlport.html#VMS) Test::Post 1.22 under 5.8.7 built for VMS_AXP breaks on the test case: all_pod_files.t The root cause is the line: push @queue, map "$file/$_", @newfiles; in the sub all_pod_files in Pod.pm, if $file is a directory, (and it is in the test case mentioned) then building up the queue results in an entry: blib/lib.dir/test.dir (Under VMS directories have the extension .dir) Unfortuently on a later iteration of this loop this entry is then queried to see if it is a directory (-d), it's now a mix of VMS syntax and *nix syntax, -d does not evaluate to true for this entry. The fix I used was to replace the line above with: foreach my $newfile (@newfiles) { if(-f File::Spec->catfile($file,$newfile)){ push @queue, File::Spec->catfile($file,$newfile); }else{ push @queue, File::Spec->catdir($file,$newfile); } } This treats the entry in @newfiles differently if it is a directory or a file, this probably makes no difference on most OS's, but on VMS it results in the entry becoming: [.blib.lib.test] Believe it or not this is the correct syntax as understood by Perl VMS. This results in -d being true and the sub all_pod_files behaving as expected on VMS. As for the test case: all_pod_files.t, this is what I did to get it to pass: # the expected array is now built up using File::Spec->catfile my @expected; $expected[0] = File::Spec->catfile('blib','lib','Test','Pod.pm'); $expected[1] = File::Spec->catfile('t','pod','good-pod-script'); $expected[2] = File::Spec->catfile('t','pod','good.pod'); $expected[3] = File::Spec->catfile('t','pod','no_pod.pod'); # these next two lines unchanged @files = sort @files; @expected = sort @expected; # There are 2 other little things that are required for VMS # (1.) case in-sensitivity # (2.) files without extensions still have a period/dot (.) if ($^O eq 'VMS') { $expected[1] = File::Spec->catfile('t','pod','good-pod-script.'); @files = map {lc($_)} @files; @expected = map {lc($_)} @expected; } Cheers, Peter (Stig) Edwards
This is good stuff. Can you send me a diff file? It'll be much easier than me piecing together your change explanations.
Subject: Re: [rt.cpan.org #17375] Test::Pod 1.22 PATCH for VMS
Date: Mon, 30 Jan 2006 17:33:21 -0600
To: bug-Test-Pod [...] rt.cpan.org
From: Andy Lester <andy [...] petdance.com>
This is good stuff. Can you send me a diff file? It'll be much easier than me piecing together your change explanations. -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance
Subject: Test::Pod 1.22 PATCH for VMS (gdiff)
From: Peter (Stig) Edwards
Created using gdiff on VMS: gdiff -b -a -n new old Hope this works. Cheers, Peter (Stig) Edwards
Download Pod.pm.gdiff
application/octet-stream 2.6k

Message body not shown because it is not plain text.

Download all_pod_files.t.gdiff
application/octet-stream 524b

Message body not shown because it is not plain text.

Updated in 1.23_01 or whatever I call the next release.