I've just had a horrible time trying to install Catalyst::Plugin::AutoCRUD, because of a dependency on WWW::Mechanize. In short, WWW::Mechanize fails to pass its tests when you're working behind an authenticating proxy.

Setting the environment variable http_proxy wasn't working out for me, so I started to look into how WWW::Mechanize can work with a proxy. Turns out it's just using LWP::UserAgent, so uses the same methods.

Working with WWW::Mechanize 1.60, the latest at today's date, I managed to get it to install with the following bit of mucking about.

Edit t/live/encoding.t and add these two lines:

$mech->proxy(['http', 'ftp'], 'http://username:password@proxy:port'); $mech->no_proxy('localhost');

They need to go in after the "my $mech = WWW::Mechanize->new" bit.

t/live/wikipedia.t also has tests that call external sites, but for some reason I couldn't get this to play ball in the same way. Being cheap, I hacked the test out of the MANIFEST before running perl Makefile.PL. I'll fathom out why that wasn't working properly in due course and paste a better solution.

Now the make test should succeed, and WWW::Mechanize will install. All other dependencies on it should also work.


Comments

comments powered by Disqus