You're still showing non-portable examples.

What is the win?

And what does "file://z/docs/personal" become?

Or for that matter "file://u/frankeh/Projects" become? (I happen to
live at a mount point /u.

You are squeezing a little too hard here. There are seperate problems
to be solved, whether a single interface can do it all is still to
be determined.

Even if you are able to squeeze some of the protocols into open.
It still requires that the lower level implmentation be visible
to the user. Get is not sufficient. The http protocol has quite
a bit of interaction that one may want to access. Similar the
ftp protocol.

All that this might do is be a shorthand. So I'm not sure that
expending effort in this direction is that much of a win.

Basically presenting all of these high level protocols with 
such a limited repetoire of operations is crippling.

<chaim>

>>>>> "NW" == Nathan Wiger <[EMAIL PROTECTED]> writes:

NW> Sam Tregar wrote:
>> 
>> How is this better than File::Spec's approach?

NW> File::Spec has the idea and representation dead on. However, the
NW> interface is a pain; to write portable scripts you have to go through
NW> some contortions.

NW> With URI support, you still have to contort a little, but not as much.
NW> Here's some better examples from an email I sent earlier:

NW>    $fo = open "file://c/docs/personal";

NW>    # Unix = /docs/personal    # here, 'c' becomes '/'
NW>    # Mac  = :docs:personal    # here, 'c' becomes ':'
NW>    # Win  = c:\docs\personal

NW> Something like File::Spec can be used to perform the magic internally,
NW> but you get the benefit of not having to call catfile explicitly. Perl
NW> sees a URI and does its thing. Plus, URIs are familiar - most everyone
NW> (even those unfamiliar with Perl) understands what the URI in the open
NW> statement does.

NW> Although the examples are terrible at showing it (sorry), full URI
NW> support means more that just writing portable filenames. It means having
NW> Perl understand http://, ftp://, etc, etc, so that it can do something
NW> "really cool" with it. The upcoming v4 of RFC 14 will show how this is
NW> an advantage.

NW> -Nate




-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to