On Sat, Aug 12, 2000 at 09:09:33PM -0700, Nathan Wiger wrote:
> 1. If called as an indirect object function (in the form currently
> proposed), steps 2-3 are skipped and the handler specified is
> automatically invoked.
What does that mean? When the handler is invoked, what does it see?
$fh = open myhttp "http://www.perl.com", "fred", "barney";
Does that result in a call like this?
myhttp::open("http://www.perl.com", "fred", "barney");
> 2. The top-level open() looks to see the file is a valid URI, namely:
>
> [method] :// [resource]
>
> If so, method becomes the handler, the :// is stripped, and the rest
> is passed to the handler.
Why strip anything? Just pass the string to the handler verbatim. It
would certainly seem weird to me if URI-handlers got something
different than other special-purpose handlers.
<imagine>
http::open("www.perl.com", "fred", "barney"); # weird
myhttp::open("http://www.perl.com", "fred", "barney");
</imagine>
> If no handler by that name has been
> registered, undef is returned.
Where are these handlers registered? How are they registered? In my
mind I was thinking that we could just name our handlers as packages
so that
$fh = open "http://www.perl.com"; # and
$fh = open myhttp "http://www.perl.com";
would cause Perl to search @INC for http.pm and myhttp.pm and auto-use
them.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]