At 22:14 Uhr -0400 06.06.2001, Chris Nandor wrote:
>At 20:40 +0200 2001.06.01, Thomas Wegner wrote:
>>I'm sending patches for "io_dir.t" and "IO::Dir". There are some path
>>specification issues that have to be fixed. And here they are:
>
>Again thanks muchly. Again, I propose using File::Spec.
>
>
>>- -e ${*$dh}{io_dir_path} . "/" . $key;
>>+ -e ${*$dh}{io_dir_path} . ${*$dh}{path_sep} . $key;
>
>For each of these, I used:
>
> File::Spec->catfile(${*$dh}{io_dir_path}, $key)
>
>instead.
Agreed. And ... Looking again at Dir.pm and remembering your reply concerning
File::Copy, I think we should really add the following to open()
sub open {
@_ == 2 or croak 'usage: $dh->open(DIRNAME)';
my ($dh, $dirname) = @_;
return undef
unless opendir($dh, $dirname);
$dirname = ':' . $dirname if ( ($^O eq 'MacOS') && ($dirname =~ /^[^:]+$/) );
# added
${*$dh}{io_dir_path} = $dirname;
}
1;
}
to avoid that "dirname in the current directory" trap. Do you agree?
Best regards,
--Thomas
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com