libwww-perl / libwww-perl/HTTP-Cookies

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

Open
#51 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
4
Forks
19
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the save() section of the HTTP::Cookies man page and compare its wording with the documented constructor filename and examples. Clarify whether calling save($file) changes the destination used by a later save() call; done when the no-argument behavior after an explicit filename is unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.