in reply to Can't locate object method REDIRECTS in package HTTP::Headers

Add:

use HTTP::Headers;

toward the top of your script.

True laziness is hard work

Replies are listed 'Best First'.
Re^2: Can't locate object method REDIRECTS in package HTTP::Headers
by Anonymous Monk on Mar 14, 2011 at 21:47 UTC
Re^2: Can't locate object method REDIRECTS in package HTTP::Headers
by Anonymous Monk on Mar 15, 2011 at 02:12 UTC
    I tried adding that to the top of the code and it still says the exact same thing. I also went to the site the other person posted and I don't think that will help since I'm not using the product that page is outlining.

    Any other advice? Thank you!

      You could try to get a stack trace (i.e. calling context) by putting the following near the top of your script:

      use Carp; BEGIN { $SIG{__DIE__} = sub { confess @_ }; }

      This might help to narrow down on where the error is originating from.  YMMV.

      I also went to the site the other person posted and I don't think that will help since I'm not using the product that page is outlining. Any other advice? Thank you!

      You missed the point, the error message is the same, it is apparently because of a mismatch between versions of Mechanize/LWP/HTTP::Headers etc etc , so just install the latest version of each module, say with

      perl -MCPAN -e 'install Bundle::LWP'
      or
      cpan LWP WWW::Mechanize