cURL / Mailing Lists / curl-users / Single Mail

curl-users

the perl interface

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 19 Dec 2000 16:43:58 +0100 (MET)

hi ho

I'm one of those fools who write a lot of weird perl hacks that do quick
downloads from various sites to mock with.

So far, I haven't really messed with the perl interface to curl and I've come
to realize that it is because I would like a better interface!

Now, this isn't meant as complaints, but as feedback and a suggestion.

I would like my perl scripts that fetch a web page to look similar to:

  /* create a new curl entity */
  my $url = new CURL;

  /* set some options */
  $url->opts('headers' => 1,
             'mute' => 1);

  /* get web page */
  @body = $url->get('http://curl.haxx.se/');

  /* print the page */
  print @body;

... because most of my scripts use very few options and the main focus is
almost always to get the page into an array.

Would this be possible? What do you other fellows think? Is there anyone that
uses this? Is there anyone that has looked into how the already existing perl
modules for this work?

So many questions... :-)

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
Received on 2000-12-19