Re: RFC 14 (v2) Modify open() to support FileObjects and
[email protected] (Piers Cawley) 10 Aug 2000 08:40:57 +0100
| Newsgroups | perl.perl6.language.io |
|---|---|
| Message-ID | <[email protected]> |
Tom Hughes <[email protected]> writes: > In message <[email protected]> > Graham Barr <[email protected]> wrote: > > > On Wed, Aug 09, 2000 at 11:41:42AM -0500, Jonathan Scott Duff wrote: > > > > > open 'ftp://ftp.perl.org/'; # ftp > > > > What user/password does it use > > Whatever you put in the URL with anonymous as default. Or, if you make open behave like tie, then you'd have open templated like 'sub open ($;@);' and then do. open 'ftp://ftp.perl.org/', 'anonymous', '[email protected]'; > > > open 'http://www.yahoo.com/'; # http > > > > will it support cookies, authentication ? > > No reason why not. Similarly this could be: open 'http://www.yahoo.com/', user => $user, pass => $pass, cookie_jar => HTTP::Cookies->new; Just let the appropriate module get the argument list passed to it a la TIEFOO. -- Piers