Hello fellow monks,

we've been using LWP::Curl v0.5 on our server quite some time, without any problems. Since we're moving to a new server, I'm testing our code, and I can't get LWP::Curl to work. I keep getting following error:

Undefined subroutine &LWP::Curl::encode called at /usr/local/share/perl/5.10.0/LWP/Curl.pm line 211.

Since it worked in v0.05 but not in v0.06, I did a diff between the two versions and found only around 10 lines had changed. It seems a bit like a quick update, because he changed

our $VERSION = '0.06';

but he forgot to change this in the POD, as you can see on CPAN.

Another change is that he used to do
use HTML::Entities
but now instead does
use URI::Escape

Now HTML::Entities has a method "encode", but URI::Escape does not. This might be what is causing the error. URI::Escape does have a method uri_escape.

Since his changelog does not even include a date, leave alone what was changed or why, I can only use the file date as reference. It seems this version dates from january 2009, so I'd be suprised if I was the first to discover this bug.

What would be my best cause of action?
* Simply use module v0.05 on the new server, and don't ever update?
* Contact the author, file a bug report?
* Fix the bug (Curl.pm) myself?

Thanks for your input!


In reply to Bug in LWP::Curl v0.6? by wdsaeghe

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.