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

Re: [MacPerl] pod2html problems



At 8:03 -0400 9/15/99, Chris Nandor wrote:
>Well, a Mac user could say the same thing about it being a pity that Unix
>has such a lame path separator.  Why is one more correct than the other?
>Yes, Unix was there first, but it certainly wasn't a standard by any means
>when the Mac was introduced.  If we could go back in time and agree on one
>newline and one path specification style, life would be easier.  We can't.
>So we deal with it.
>
>That said, you should check out the Mac::FileSpec::Unixish module.  It
>allows you to use a Unixish filespec and translate it to a Macish filespec:
>
>  use Mac::FileSpec::Unixish;
>  $foo = "../analyses/ziz.txt";
>  open(OUT, '>' . nativize($foo) ) || die "Couldn't open $foo: $!";
>
>nativize() will leave the path unchanged on Windows and Unix, but change it
>into a Mac path in Mac OS.  The module is on CPAN and is included in the
>cpan-mac distribution (which I recommend everyone who works with CPAN and
>MacPerl should install).

Given that there is an appropriate URL handler "everywhere," (I don't know
the truth of that proposition) one could encode paths in "file://..." URLs
and translate when ready to use the file.

   --John
-- 
John Baxter   jwblist@olympus.net      Port Ludlow, WA, USA

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