Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

WWW::Mechanize, new version, broken code

by WhiteBird (Hermit)
on Jul 25, 2004 at 02:11 UTC ( #377213=perlquestion: print w/replies, xml ) Need Help??

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

I'm using ActiveState Perl 5.6.1. I'm building a small web spider using WWW:Mechanize. The code was coming along nicely but I was having some trouble getting one form to submit because the fields were select fields with drop down options. While I was thinking about that I decided to check my version of Mechanize with ppm. Results back from ppm indicated that a more current version was available, so I blithely went ahead and updated the module from .43 to .48.

Now my new code won't run and neither will any of my old code that relied on WWW::Mechanize. The error I get is:

Can't locate object method "requests_redirectable" via package "WWW::Mechanize" (perhaps you forgot to load "WWW::Mechanize"?)...

Since I hadn't changed any of the code I assume that there's been a change in the module that caused a problem. I did a super search and came up with this node: WWW:Mechanize and Windows. Akira71 was having the same trouble with version .48 of Mechanize on Windows. I was surprised to find that I had replied, saying that I ran the posted code on my system (v.43) with no problems--perhaps it was the version number.

So, now I really want to bang my head on the desk. I've read the all of the documentation that I can find but I can't figure out which piece of the code has changed and why I'm getting this error. I would appreciate any enlightenment, guidance or instruction from the Monastery--Did Akira71 ever solve the problem? What can I do to get my WWW::Mechanize to get past this error? I notice that CPAN has yet a more current version...can that be installed on Windows without too much trouble?

Replies are listed 'Best First'.
Re: WWW::Mechanize, new version, broken code
by jacques (Priest) on Jul 25, 2004 at 02:53 UTC
    I notice that CPAN has yet a more current version...

    I think this illustrates why people should not use ppm and activestate. Current versions of my own Win32 modules are not available via ppm, but old versions, including one with a nasty bug, are.

    Installing the current version of Mech should be no problem from cpan. If you have trouble, just come back for help.

      Thanks for the reply. I suspect you might be right about ppm and ActiveState in this case. I removed the ActiveState version and went to CPAN.

      My first attempt was to download and attempt to install the most current version of Mech now out there (1.02). Of course, in an ideal world installing a module would be "no problem", but things never run quite so smoothly for me. I hit a dependency with HTML::Parser (v 3.3) for LWP and I could not get it to 'make'. It appears to need a different compiler; but that's a battle I shall save for another day.

      I went back several versions of Mechanize and settled on version .59. Probably since it is such an old version it installed nicely. All of my mech code runs again. And I'm back to square one.

      I'm getting different errors, but I can't get any response on my multi-select form. If the documentation on CPAN regarding WWW::Mechanize is any indication, I'm not going to be able to get that to work with this version no matter what I do.

        If I were you, I would just uninstall ActivePerl. Get rid of everything from ActiveState, but keep your programs. Then install Cygwin. Go with their Perl distribution.
Re: WWW::Mechanize, new version, broken code
by castaway (Parson) on Jul 26, 2004 at 09:14 UTC
    You could try looking around for other, more up to date, ppm repositories. PodMaster for example, keeps one, and takes requests, try He might build you a newer HTML::Parser, if you ask nicely. (Though I don't know if he has a 5.6 he can build things on) ..


      Thanks, castaway. That's one of the things I love about PerlMonks---all the available resources. I think I have a compiler available at work (VB.NET resource) and I want to look into learning to compile my own modules anyway. I'll play around with that before calling on PodMaster.

      There seems to be plenty of resources available about the issue on SuperSearch, too.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://377213]
Approved by beable
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2022-05-24 19:21 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (84 votes). Check out past polls.