Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't locate object method "cookie_jar" via package "WWW::Mechanize::Chrome" #40

Closed
KES777 opened this issue Apr 23, 2019 · 3 comments
Closed

Comments

@KES777
Copy link

KES777 commented Apr 23, 2019

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?

Corion pushed a commit that referenced this issue Apr 23, 2019
This addresses GH issue #40
@Corion
Copy link
Owner

Corion commented Apr 23, 2019

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.

@Corion Corion closed this as completed Apr 23, 2019
@sdondley
Copy link
Contributor

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

@KES777
Copy link
Author

KES777 commented Apr 24, 2019

@Corion I was trying to setup cookies for the request. Tried to login to a site

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants