Craig A. Berry wrote:
On 9/10/07, David Landgren <[EMAIL PROTECTED]> wrote:
Craig A. Berry wrote:
On 9/8/07, Rafael Garcia-Suarez <[EMAIL PROTECTED]> wrote:
On 08/09/2007, David Landgren <[EMAIL PROTECTED]> wrote:
The following patch to Path.pm and Path.t allows blead's test suite to
run without errors.
Thanks, applied as #31819.
The number of test failures in blead on VMS went from about 20 to
about 40 after this, mostly in CPANPLUS and Module::Build, which make
heavy use of rmtree. I'm working on it, but not done yet.
I had 32 test failures as of this morning. Three new ones for me
including Path.t.
Odd. They just does rmtree($dir) with nothing fancy. Keep me posted: I
have a couple of spelling POD fixups a sub-optimal code thing to fix up
as well, so I'll hold off sending them fro the time being.
The files conf.pl in the CPANPLUS directories were using catfile to send
the VMS syntax of "[.foo]bar.dir" as a directory into rmtree. I
submitted a patch early Sunday morning to fix that.
If you could send me the changes rather than to blead then only one
change would need to be made. But if not, no matter.
Sorry, I just saw this after checking in #31843, which I also attach
here. Here was my changelog description:
VMS help for File::Path 2.00_11: chdir() is finicky about directory
format; catdir spews warnings when given files that aren't directories;
File::Spec functions may call stat(), thus zapping C<_>; filenames with
characters that need escaping (such as spaces), must have some path
syntax attached to them and be converted to native syntax in order to
force escaping to take place.
I'm not happy about adding more special-case code, but I couldn't see
any other way around these problems. The effect on non-VMS platforms
should be negligible: I moved an lstat() down a few lines and replaced
a catdir with a catfile where what's being passed to it could be
either directories or a directory and a file.
With this patch, I am still failing on the following test:
not ok 23 - removed directory (old style 2)
# Failed test 'removed directory (old style 2)'
# at [-.lib.file]path.t line 105.
# got: '0'
# expected: '1'
What is happening is that it is checking the permission of a directory
using VMS::Filespec::candelete($root) and discovering that it does not
have delete permission, so is skipping it. Normally directories on VMS
are created with out delete permission granted.
Previously it had verified that it had write permission, so did not do a
chmod() on it to add write permission.
Unfortunately on VMS if you want to add delete permission using chmod(),
the way to do it is to explicitly add write permission.
So really the VMS::Filespec::candelete test needs to be done where code
is decided if to call chmod() to add write privilege or not.
Also, on the special case to handle '.' returned by readdir() on VMS, it
will always be the first file or $file[0] if it exists, so there is no
need to look through the entire array for it. Unless you are
anticipating something changing the way that readdir() on VMS may be
implemented.
-John
[EMAIL PROTECTED]
Personal Opinion Only