develooper Front page | perl.perl6.language.io | Postings from August 2000

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

Thread Previous | Thread Next
From:
Jon Ericson
Date:
August 11, 2000 13:46
Subject:
Re: RFC 14 (v3) Modify open() to support FileObjects and
Message ID:
39946615.21D06F85@jpl.nasa.gov
Perl6 RFC Librarian wrote:
>    # Open a remote webpage
>    $http = open http "http://www.perl.com/", GET;
                  ^^^^                       ^^^^^
>    @doc = <$http>;
>    print @doc if $http->content_type eq 'text/html';
>    close $http;

This open seems awfully crufty to me.  The URL says that it's a http
resource, so why do we have to tell open to use a http handler?  We are
opening it for input ("If MODE is '<' or nothing, the file is opened for
input." -- perlfunc), so why do we have to tell open to use the GET
method?  Simple opens should have simple syntax.  


Jon
-- 
Knowledge is that which remains when what is
learned is forgotten. - Mr. King

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About