Can't locate object method "cookie_jar" via package "WWW::Mechanize::Chrome"
KES777 opened this issue · comments
I use WWW::Mechanize::Chrome
to produce pdf from urls.
at https://metacpan.org/pod/HTTP::CookieMonster I found example from SYNOPSYS:
use HTTP::CookieMonster;
my $monster = HTTP::CookieMonster->new( $mech->cookie_jar );
and get the error:
Can't locate object method "cookie_jar" via package "WWW::Mechanize::Chrome" at
How to setup cookies for WWW::Mechanize::Chrome
?
The commit above (to be released in v0.29, on its way to CPAN) adds a ->cookie_jar
method that returns a prefilled cookie jar. I don't know what you want to do with it and what HTTP::CookieMonster does. Randomly trying to call methods that are not even documented on an object is not a strategy for success.
I think probably part of the confusion might be that one might expect the methods from WWW::Mechanize to be inherited. I know I wondered the same thing: https://metacpan.org/pod/WWW::Mechanize#cookie_jar
@Corion I was trying to setup cookies for the request. Tried to login to a site