[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] _57's pod failures: workaround



At 0.42 -0400 1999.06.02, Peter Prymmer wrote:
>Here is a workaround for the pod test suite failures
>that does away with a tiny UNIXism in FileHandle->new()
>which is implemented via IO::File::open():
>
>************
>File DKA300:[PERL5_005_57.LIB.IO]FILE.PM;2
>  161   #	$file = './' . $file if $file =~ m{\A[^\\/\w]};
>  162   	$file = IO::Handle::_open_mode_string($mode) . " $file\0";
>******
>File DKA300:[PERL5_005_57.LIB.IO]FILE.PM;1
>  161   	$file = './' . $file if $file =~ m{\A[^\\/\w]};
>  162   	$file = IO::Handle::_open_mode_string($mode) . " $file\0";
>************

What about using File::Spec, since it is now included with perl?

  $file = catfile(curdir, $file) if $file =~ m{\A[^\\/\w]};

Hm.  I wonder if it might be a good idea to add a $FILESEP variable or
something to File::Spec?  Maybe even two:  $FILESEP and $FILESEPCLASS, the
latter being used for regexes like this.

  $file = catfile(curdir, $file) if $file =~ m{\A[^$FILESEP\w]};

Just some early morning thoughts.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org