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

Mention if save( $file ) updates name used in construction #51

Open
jidanni opened this issue Nov 15, 2017 · 0 comments
Open

Mention if save( $file ) updates name used in construction #51

jidanni opened this issue Nov 15, 2017 · 0 comments

Comments

@jidanni
Copy link

jidanni commented Nov 15, 2017

On man page at

        $cookie_jar->save( $file )
           This method file saves the state of the $cookie_jar to a file.  The
           state can then be restored later using the load() method.  If a
           filename is not specified we will use the name specified during
           construction.  If the attribute ignore_discard is set, then we will
           even save cookies that are marked to be discarded.

mention if this is exactly the same as just

open(my $ckf, ">", $file);
print $ckf $cookie_jar->as_string;
close $ckf;

or if it updates the name used during construction.

I.e.,

         $cookie_jar = HTTP::Cookies->new(
           file => "$ENV{'HOME'}/lwp_cookies.dat",
         );
        $cookie_jar->save( ); #Saves to "$ENV{'HOME'}/lwp_cookies.dat"
        $cookie_jar->save( $file ) #Saves to $file
        $cookie_jar->save( ); #man page not clear about now where this will save to
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

1 participant