Re: [Module::Build] Re: Module::Build status on VMS
Status: Beta
Brought to you by:
kwilliams
|
From: Craig A. B. <cra...@ma...> - 2006-01-27 01:50:45
|
At 5:35 PM -0600 1/26/06, Ken Williams wrote:
>On Jan 26, 2006, at 11:45 AM, Craig A. Berry wrote:
>>The pathname is ok. The test can't find it because it really doesn't
>>exist because it got deleted by DistGen->clean(), which doesn't
>>recognize it as one of the directories in its cache of directory
>>names. The basic issues revolve around VMS filespec idiosyncracies.
>>For example, we'll have to call splitpath before splitdir if we want
>>the device name to be separated from the first directory name:
>>
>>$ perl -e "use File::Spec; print join('|', File::Spec->splitdir('DEV:[foo.bar]'));"
>>DEV:[foo|bar
>>$ perl -e "use File::Spec; print join('|', File::Spec->splitpath('DEV:[foo.bar]'));"
>>DEV:|[foo.bar]|
>
>
>How's the following patch look for this issue?
>
>Index: t/lib/DistGen.pm
>===================================================================
>RCS file: /cvsroot/module-build/Module-Build/t/lib/DistGen.pm,v
>retrieving revision 1.15
>diff -u -r1.15 DistGen.pm
>--- t/lib/DistGen.pm 4 Dec 2005 08:48:09 -0000 1.15
>+++ t/lib/DistGen.pm 26 Jan 2006 23:34:39 -0000
After applying that and turning on verbosity, I'm seeing:
$ perl [-.lib.module.build.t]tilde.t
1..11
Changed file 't/basic.t'.
Changed file 'lib/Simple.pm'.
Changed file 'Build.PL'.
Removing '[]/build.pl'
Removing '[]/manifest.'
Removing '[]/lib/simple.pm'
Removing '[]/lib'
Removing '[]/t/basic.t'
Removing '[]/t'
Removing '[]/[]'
Can't cd to D0:[CRAIG.perl.t._tmp.Simple]: no such file or directory
# No tests run!
We're tripping over the particular sequence in which filenames (or
their component parts) are converted to and from native syntax inside
of File::Find. After applying the following (which would have to be
made VMS-specific and may not be the best solution anyway):
--- distgen.pm;-1 Thu Jan 26 18:51:59 2006
+++ distgen.pm Thu Jan 26 18:59:40 2006
@@ -303,7 +303,7 @@ sub clean {
print "Removing '$name'\n" if $VERBOSE;
File::Path::rmtree( $_ );
}
- }, File::Spec->curdir );
+ }, './' );
chdir( $here );
}
[end]
I then get
$ perl [-.lib.module.build.t]tilde.t
1..11
Changed file 't/basic.t'.
Changed file 'lib/Simple.pm'.
Changed file 'Build.PL'.
Removing 'build.pl'
Removing 'manifest.'
Removing '[.lib]simple.pm'
Removing 'lib'
Removing 't'
Removing '[]'
Can't cd to D0:[CRAIG.perl.t._tmp.Simple]: no such file or directory
# No tests run!
So now we're getting to the problem that was Yitzchak's first theory,
namely that it's a case problem, more specifically, the case-leveled
names returned from File::Find do not match the case-preserved names
in the hash, so we delete the files because they are not recognized.
One way to deal with this would be to acquire or build a
case-tolerant tied hash and use one of those instead of an ordinary
hash. Basically when you look up a case-preserved name in the hash
and it doesn't match, it will then look up a case-leveled version for
you. Schwern suggested this solution a long time ago for
ExtUtils::Manifest::manifind() and it's still needed there, so
perhaps we could put such a package in a place where both MM and MB
can use it. I think there are a couple of implementations on CPAN .
--
________________________________________
Craig A. Berry
mailto:cra...@ma...
"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser
|