From: Craig A. Berry Date: Mon, 29 Apr 2002 23:37:06 +0000 (-0500) Subject: t/pod/testp2pt.pl: roll back 16254 for VMS X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dfe12e9fe705de0c09d9509573cb4c050307bbd6;p=p5sagit%2Fp5-mst-13.2.git t/pod/testp2pt.pl: roll back 16254 for VMS From: "Craig A. Berry" Message-Id: p4raw-id: //depot/perl@16276 --- diff --git a/t/pod/testp2pt.pl b/t/pod/testp2pt.pl index 2db7c3f..f432719 100644 --- a/t/pod/testp2pt.pl +++ b/t/pod/testp2pt.pl @@ -48,8 +48,17 @@ if ($^O eq 'VMS') { # clean up directory spec $INSTDIR =~ s#/000000/#/#; } -$INSTDIR = (dirname $INSTDIR) if ((File::Spec->splitdir($INSTDIR))[-1] eq 'pod'); -$INSTDIR = (dirname $INSTDIR) if ((File::Spec->splitdir($INSTDIR))[-1] eq 't'); +if ($^O eq 'VMS') { + # File::Spec::VMS::splitdir doesn't work on Unix syntax filespecs, but + # on VMS syntax filespecs dirname returns (as documented) the directory + # part of the path (NOT the parent directory, as is assumed in this script). + $INSTDIR = (dirname $INSTDIR) if (basename($INSTDIR) eq 'pod'); + $INSTDIR = (dirname $INSTDIR) if (basename($INSTDIR) eq 't'); +} +else { + $INSTDIR = (dirname $INSTDIR) if ((File::Spec->splitdir($INSTDIR))[-1] eq 'pod'); + $INSTDIR = (dirname $INSTDIR) if ((File::Spec->splitdir($INSTDIR))[-1] eq 't'); +} my @PODINCDIRS = ( catfile($INSTDIR, 'lib', 'Pod'), catfile($INSTDIR, 'scripts'),