How do I revert to a previous version of a module/package?

Posted by meir on 2012-12-06 09:01
Forums: PPM | OS: All / Any

Seemingly, after upgrading the WWW::mechanize package from version 1.60 to version 1.72, my application hangs at a "submit_form" method when the server hangs. At V. 1.60 it timed out properly.

Since I am not sure yet if the new version is the culprit, I would like to revert to the previous one. I couldn't find any directions for this.

Any idea???

Regards
Meir

grahams
ActiveState Staff
Wed, 2013-01-02 11:48

One copy must be in the "perl" area. This is the pre-installed set of modules. PPM can't add modules to "perl" and can't delete modules from "perl".

The second copy must be in the "site" area. This is the set of user added modules. Under ActivePerl, "site" takes precedence over "perl".

If you have two copies of a module, you can use PPM to delete the copy in "site". ActivePerl will automatically revert back to the "perl" version.

If you do not have two copies of a module, you can uninstall the "site" version, then manually download and install a specific version of the module from the PPM index page. Note that this operation will require a Business Edition license.
http://community.activestate.com/node/8128

If you don't have a Business Edition license, your options are more limited. PPM v4 has a limitation that only one version of a module can be served. You may be able to find the older version you want on a non-ActiveState PPM server. If not, you may be able to download the older version from CPAN and install it using the "cpan" tool.

meir | Wed, 2013-01-02 23:24

Thanks Graham,

After lots of intrusions to mechanize and LWP, I traced the hanging point to the LWP::UserAgent method "$protocol->request" at LINE 193, called from WWW::Mechanize 'submit_form' method. There the $protocol object is of the 'LWP::Protocol::http' class. At this point I got lost. I am too much of a newbie to understand what is going on there.

I regret to say that my solution was to totally expunge Perl from my machine, including everything "perl" from the registry, and reinstalling it again. Of course, I refrained from upgrading WWW::Mechanize to the latest (1.72) version.

Here is my environment:
* OS: x64 Windows 7 Pro on an Intel x64 processor
* Perl: ActiveState Perl v5.14.2 built for MSWin32-x64-multi-thread (with 1 registered patch)
* WWW::Mechanize: version 1.72
* LWP (including LWP::UserAgent and LWP::Protocol::http) version 6.02

(There I had another problem: one module I use in turn uses another module, but one of a higher version then is available to PPM. The CPAN client first failed to install it due to the absence of a proper C compiler. It turns out that ActivePerl have a problem with 64-bit machines with regard to such compilers. But after manually installing a compiler from Microsoft, I was successful in installing the higher version module using the CPAN client from ActiveState.)