On Mon, Aug 14, 2000 at 03:01:54PM -0700, Nathan Wiger wrote:
> > or less verbose,
> > 
> >         $fh = open "<http://my.homepage.com";
> 
> This is still up in the air. I think this will probably end up doing a
> GET via the http handler on the webpage specified. That seems the most
> natural, since you'd probably want these to work the same:
> 
>    open http "<http://www.yahoo.com";  # GET
>    open "<http://www.yahoo.com";       # GET also

Random thoughts:

        open "http://www.perl.com";
        open "http://www.perl.com?foo=bar&baz=blat";
        open "http://www.perl.com", %args;
        open "http://www.perl.com", { mode => 'POST' }, %args;

Hmm.  I think that "modes" should be made explicit rather than relying
on special characters fore or aft of the "filename".  Especially since
the individual handlers get to decide how they want to treat that
filename.

I'd say any "filename" that starts with the usual open-special
characters should take the rest of the string as a literal filename on
the local system.

> Which makes it consistent with these, which you'd assume would work the
> same:
> 
>    open ">>/var/log/mylog";
>    open ">>file:///var/log/mylog";

        open "file:///var/log/mylog", { mode => 'APPEND' };

Here's a translation of the last http and the above file opens:

        http->open("http://www.perl.com", { mode => 'POST' }, %args);
        file->open("file:///var/log/mylog", { mode => 'APPEND' });

What do you think?

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to