Re: RFC 14 (v2) Modify open() to support FileObjects and

[email protected] (Nick Ing-Simmons) Wed, 16 Aug 2000 20:08:31 +0000
Newsgroups perl.perl6.language.io
Message-ID <E13P9UE-0002yG-00@roam1>
Nathan Wiger <[email protected]> writes:
>Admittedly, it does look cooler, but consider this:
>
>   open 'http://www.yahoo.com/';
>   open 'https://www.etrade.com/';        # what module? https?

Yes - if you don't have one it fails "https protocol not found".

>
>No matter what, you're going to have to embed something in there that
>decides for you what todo. What if an "httpx:" method comes out?? 

See above.


>Will
>Perl < 6.2.1 (when the "httpx:" hook was added) not work?

You have to install the IO::httpx module from CPAN 

>
>Also, what if you write your own module, say "MyHttp", that you want to
>open certain documents? How do you do this? The more general notation:

The whole point of URI scheme is it is extensible. So 

open MyHttp://www.yahoo.com/', $custom, $args;

should "just work" if the module is in the right place, and give 
a meaningful error if it isn't.

>
>   open MyHttp, 'http://www.yahoo.com/', $custom, $args;
>
>Allows you to do this simply, in a syntax that is already established.

The URI syntax is also well established.

-- 
Nick Ing-Simmons