Jos I. Boumans wrote:
On 03 Sep 2007, at 00:23, John E. Malmberg wrote:
In lib/CPANPLUS/Dist/Build/t/02_CPANPLUS-Dist-Build.t, catfile is
needed for merging files with directories. Also need to look for the
C<.packlist> in $Config{archname} . 'auto'.
In lib/CPANPLUS/Dist/Build.pm, On VMS, the command arguments need to
be quoted, and ".com" needs to be appended to match the filename
created by module build.
Thanks, both applied.
Ken, if you're happy with the change, we should release a new version
of C::D::Build.
In lib/CPANPLUS/Internals/Extract.pm, catdir on VMS can not deal with
directory components with dots in them. Need to translate them as
VMS.C in the default mode expects them. This is a temporary hack
that will need to be revised as ODS-5 support is integrated in to Perl.
Thanks, applied. However, i have a question:
--- /rsync_root/perl/lib/CPANPLUS/Internals/Extract.pm Fri Aug 31
17:43:18 2007
+++ lib/CPANPLUS/Internals/Extract.pm Sat Sep 1 15:52:49 2007
@@ -199,8 +199,17 @@
### well, then we really don't know.
my $dir;
- for my $try ( File::Spec->rel2abs( File::Spec->catdir(
- $to, $mod->package_name .'-'. $mod-
>package_version ) ),
+ my $pkg_namver = $mod->package_name .'-'. $mod->package_version;
+
+ # catdir on VMS can not currently deal with directory components
+ # with dots in them. In the default mode, VMS.C internally
+ # converts these to '_'. This will need to be fixed again here
+ # when EFS character support is enabled, and that may require
+ # testing for that.
+
+ $pkg_namver =~ tr/\./_/ if $^O eq 'VMS';
+
+ for my $try ( File::Spec->rel2abs( File::Spec->catdir( $to,
$pkg_namver ) ),
File::Spec->rel2abs( $ae->extract_path ),
) {
($dir = $try) && last if -d $try;
The tr/// only changes the *first* . to an _, is this really what is
intended? or should
a /g be appended there? Most versions only have one . in them, but some
have several if
they use the x.y.z notation, or something even more exotic...
After encountering this again in the Module Build tests, I think it may
be better to let VMS:::Filespec::vmsify do the translation, as it knows
when to change the dots to underscores.
It is a three step procedure:
1. Make sure that the value to be converted, $pkg_namver is in UNIX
directory syntax by appending a '/' to it.
2. Use VMS::Filespec::vmsify($pkg_namver . '/') to convert the dots to
underscores if needed. The trailing '/' is needed as so that C<vmsify>
knows that it should use directory translation instead of filename
translation, as filename translation leaves one dot.
3. Use $pkg_namver =
File::Spec->splitdir(VMS::Filespec::vmsify($pkg_namver . '/') if
$^O eq 'VMS'; to get remove the directory delimiters.
This will work for VMS in its traditional ODS-2 mode, and it will also
work if VMS is in the ODS-5 mode that is being implemented.
-John
[EMAIL PROTECTED]