Skip to content

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

@jidanni

Description

@jidanni

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions