Chaim Frenkel wrote:
> 
> >>>>> "PRL" == Perl6 RFC Librarian <[EMAIL PROTECTED]> writes:
> 
> PRL>    $fo = open "C:\Windows\System";        # non-portable
> PRL>    $fo = open "file://C|/Windows/System"; # portable
> 
> In what way is the second example portable? I don't think it will
> do anything useful on any of my *nix boxes.

This is a big problem, you're right. I don't know of any easy way to
work around Windoze's brain-dead drive letters. There's definitely no
quick fixes.

Note that Macs vs Unix don't have a problem:

   # /docs/personal on Unix
   # :docs:personal on MacOS
   $fo = open "file:///docs/personal";

The best fix I see is to accept technically incorrect URIs (missing |
after drive letter), then change the drive letter to the correct root
notation on the platform:

   open "file://c/docs/personal";  # not "C|"

   # Unix = /docs/personal
   # Mac  = :docs:personal
   # Win  = c:\docs\personal

That's the easiest solution I can think of, and seems to make sense.

-Nate

Reply via email to