MiklerGM has asked for the wisdom of the Perl Monks concerning the following question:

Hello, Monks!

I search for wisdom^Wdocumentation.

I need to benchmark my internet conncetion ( download file, calculate size and time and recive a speed.
I want to use libcurl
http://search.cpan.org/~szbalint/WWW-Curl-4.15/lib/WWW/Curl.pm
But there are an awful documentation, i think

Replies are listed 'Best First'.
Re: libcurl and WWW::Curl speed benchmark
by moritz (Cardinal) on Apr 04, 2011 at 11:53 UTC
      i search for this http://curl.haxx.se/mail/lib-2002-04/0223.html
      on CPAN pure documentation, working examples but there are no fully help about all params
      hmmm, now i have a problem like this
      Undefined subroutine &Curl::easy::getinfo called at p.pl line 62
      Line 62: $start = $curl->$getinfo(CURLINFO_STARTTRANSFER_TIME);

      but $bytes = $curl->getinfo(CURLINFO_SIZE_DOWNLOAD); works fine

        This article is from 2002, a lot can change in 9 years. The module was renamed from Curl::easy to WWW::Curl::easy in 2003, prior to it being uploaded to CPAN. Then another change to WWW::Curl::Easy in 2005, WWW::Curl::easy was removed in 2008. As has already been pointed out, WWW::Curl states:

        "This module provides a Perl interface to libcurl. It is not intended to be a standalone module and because of this, the main libcurl documentation should be consulted for API details at http://curl.haxx.se. The documentation you're reading right now only contains the Perl specific details, some sample code and the differences between the C API and the Perl one."

        It may be worth actually reading and understanding a modules documentation before writing it off as "awful".

        don't look at outdated info, see this
Re: libcurl and WWW::Curl speed benchmark
by BrowserUk (Patriarch) on Apr 04, 2011 at 14:17 UTC
    I need to benchmark my internet conncetion ( download file, calculate size and time and recive a speed.

    FWIW: wget does this for you every time you use it:

    wget -c http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/perl-5.12.3.t +ar.gz Connecting to ftp.esat.net|193.120.14.241|:80... connected. HTTP request sent, awaiting response... 206 Partial Content Length: 14933787 (14M), 12347274 (12M) remaining [application/x-gzip] Saving to: `perl-5.12.3.tar.gz' 40% [++++++++++=============> ] 6,11 +6,789 200K/s eta 44s ^

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re: libcurl and WWW::Curl speed benchmark
by Anonymous Monk on Apr 04, 2011 at 12:19 UTC