HTTP-CookieMonster-0.11/000755 000765 000024 00000000000 13615062315 016252 5ustar00olafaldersstaff000000 000000 HTTP-CookieMonster-0.11/perltidyrc000644 000765 000024 00000000330 13615062315 020352 0ustar00olafaldersstaff000000 000000 --blank-lines-before-packages=0 --iterations=2 --no-outdent-long-comments -b -bar -boc -ci=4 -i=4 -l=78 -nolq -se -wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" HTTP-CookieMonster-0.11/perlcriticrc000644 000765 000024 00000004405 13615062315 020665 0ustar00olafaldersstaff000000 000000 severity = 3 verbose = 11 theme = core + pbp + bugs + maintenance + cosmetic + complexity + security + tests + moose exclude = Subroutines::ProhibitCallsToUndeclaredSubs [BuiltinFunctions::ProhibitStringySplit] severity = 3 [CodeLayout::RequireTrailingCommas] severity = 3 [ControlStructures::ProhibitCStyleForLoops] severity = 3 [InputOutput::RequireCheckedSyscalls] functions = :builtins exclude_functions = sleep severity = 3 [Moose::RequireCleanNamespace] modules = Moose Moose::Role MooseX::Role::Parameterized Moose::Util::TypeConstraints cleaners = namespace::autoclean [NamingConventions::Capitalization] package_exemptions = [A-Z]\w+|minFraud file_lexical_variables = [A-Z]\w+|[^A-Z]+ global_variables = :starts_with_upper scoped_lexical_variables = [A-Z]\w+|[^A-Z]+ severity = 3 # Given our code base, leaving this at 5 would be a huge pain [Subroutines::ProhibitManyArgs] max_arguments = 10 [RegularExpressions::ProhibitComplexRegexes] max_characters = 200 [RegularExpressions::ProhibitUnusualDelimiters] severity = 3 [Subroutines::ProhibitUnusedPrivateSubroutines] private_name_regex = _(?!build)\w+ skip_when_using = Moo::Role Moose::Role MooseX::Role::Parameterized Role::Tiny Test::Class::Moose::Role [TestingAndDebugging::ProhibitNoWarnings] allow = redefine [ValuesAndExpressions::ProhibitEmptyQuotes] severity = 3 [ValuesAndExpressions::ProhibitInterpolationOfLiterals] severity = 3 [ValuesAndExpressions::RequireUpperCaseHeredocTerminator] severity = 3 [Variables::ProhibitPackageVars] add_packages = Test::Builder [TestingAndDebugging::RequireUseStrict] [TestingAndDebugging::RequireUseWarnings] [-ControlStructures::ProhibitCascadingIfElse] [-ErrorHandling::RequireCarping] [-InputOutput::RequireBriefOpen] [-ValuesAndExpressions::ProhibitConstantPragma] # No need for /xsm everywhere [-RegularExpressions::RequireDotMatchAnything] [-RegularExpressions::RequireExtendedFormatting] [-RegularExpressions::RequireLineBoundaryMatching] [-Subroutines::ProhibitExplicitReturnUndef] # http://stackoverflow.com/questions/2275317/why-does-perlcritic-dislike-using-shift-to-populate-subroutine-variables [-Subroutines::RequireArgUnpacking] [-Subroutines::RequireFinalReturn] # "use v5.14" is more readable than "use 5.014" [-ValuesAndExpressions::ProhibitVersionStrings] HTTP-CookieMonster-0.11/cpanfile000644 000765 000024 00000003250 13615062315 017756 0ustar00olafaldersstaff000000 000000 requires "Carp" => "0"; requires "HTTP::Cookies" => "0"; requires "Moo" => "1.000003"; requires "Safe::Isa" => "0"; requires "Scalar::Util" => "0"; requires "Sub::Exporter" => "0"; requires "URI::Escape" => "0"; requires "perl" => "5.006"; requires "strict" => "0"; requires "warnings" => "0"; on 'test' => sub { requires "ExtUtils::MakeMaker" => "0"; requires "File::Spec" => "0"; requires "Test::Fatal" => "0"; requires "Test::More" => "0"; requires "perl" => "5.006"; }; on 'test' => sub { recommends "CPAN::Meta" => "2.120900"; }; on 'configure' => sub { requires "ExtUtils::MakeMaker" => "0"; requires "perl" => "5.006"; }; on 'develop' => sub { requires "Code::TidyAll" => "0.71"; requires "Code::TidyAll::Plugin::SortLines::Naturally" => "0.000003"; requires "Code::TidyAll::Plugin::Test::Vars" => "0.04"; requires "Code::TidyAll::Plugin::UniqueLines" => "0.000003"; requires "Parallel::ForkManager" => "1.19"; requires "Perl::Critic" => "1.132"; requires "Perl::Tidy" => "20180220"; requires "Pod::Coverage::TrustPod" => "0"; requires "Pod::Wordlist" => "0"; requires "Test::CPAN::Changes" => "0.19"; requires "Test::Code::TidyAll" => "0.50"; requires "Test::EOL" => "0"; requires "Test::Mojibake" => "0"; requires "Test::More" => "0.96"; requires "Test::Pod" => "1.41"; requires "Test::Pod::Coverage" => "1.08"; requires "Test::Portability::Files" => "0"; requires "Test::Spelling" => "0.12"; requires "Test::Synopsis" => "0"; requires "Test::Vars" => "0.014"; requires "Test::Version" => "1"; requires "WWW::Mechanize" => "0"; }; on 'develop' => sub { recommends "Dist::Zilla::PluginBundle::Git::VersionManager" => "0.007"; }; HTTP-CookieMonster-0.11/Changes000644 000765 000024 00000002502 13615062315 017544 0ustar00olafaldersstaff000000 000000 Revision history for HTTP-CookieMonster 0.11 2020-01-31 17:32:56Z - Remove Storable dependency (GH#10) - Move WWW::Mechanize to develop dependencies 0.10 2020-01-30 18:20:52Z - Remove Data::Serializer (GH#5) (Olaf Alders) - Fixed pod error as reported by CPANTS. (GH#3) (Mohammad S Anwar) - Minor improvement to method set_cookie() with test. (GH#2) (Mohammad S Anwar) 0.09 2014-11-24 10:23:51 America/Toronto - Removes the BETA warning - Fixes some Pod typos 0.08 2014-10-22 13:47:09 America/Toronto - Cookie values are now unescaped before reading and escaped before writing. 0.07 2014-02-04 10:50:27 America/Toronto - Adds local to MANIFEST.SKIP 0.06 2014-02-04 10:42:31 America/Toronto - Adds delete_cookie() method 0.05 2012-09-28 - Fixes typo in SYNOPSIS 0.04 2012-09-19 - Now using BUILDARGS to accept just one argument when creating new HTTP::CookieMonster object - Adds cookies() function for quick read-only cookie access 0.03 2012-08-23 - all_cookies() now returns an ARRAY rather than ARRAYREF, but will still return the reference if not called in list context - all_cookies() is now a regular method rather than an accessor 0.02 2012-08-21 - Fixes errors in Pod - Fixes internal cookie setting 0.01 2012-08-21 - Initial release HTTP-CookieMonster-0.11/MANIFEST.SKIP000644 000765 000024 00000000102 13615062315 020141 0ustar00olafaldersstaff000000 000000 .build .git .gitignore .perlcriticrc MANIFEST.SKIP local t/blog.t HTTP-CookieMonster-0.11/INSTALL000644 000765 000024 00000004376 13615062315 017315 0ustar00olafaldersstaff000000 000000 This is the Perl distribution HTTP-CookieMonster. Installing HTTP-CookieMonster is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm HTTP::CookieMonster If it does not have permission to install modules to the current perl, cpanm will automatically set up and install to a local::lib in your home directory. See the local::lib documentation (https://metacpan.org/pod/local::lib) for details on enabling it in your environment. ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan HTTP::CookieMonster ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, install configure prerequisites (see below), then build it: % perl Makefile.PL % make && make test Then install it: % make install On Windows platforms, you should use `dmake` or `nmake`, instead of `make`. If your perl is system-managed, you can create a local::lib in your home directory to install modules to. For details, see the local::lib documentation: https://metacpan.org/pod/local::lib The prerequisites of this distribution will also have to be installed manually. The prerequisites are listed in one of the files: `MYMETA.yml` or `MYMETA.json` generated by running the manual build process described above. ## Configure Prerequisites This distribution requires other modules to be installed before this distribution's installer can be run. They can be found under the "configure_requires" key of META.yml or the "{prereqs}{configure}{requires}" key of META.json. ## Other Prerequisites This distribution may require additional modules to be installed after running Makefile.PL. Look for prerequisites in the following phases: * to run make, PHASE = build * to use the module code itself, PHASE = runtime * to run tests, PHASE = test They can all be found in the "PHASE_requires" key of MYMETA.yml or the "{prereqs}{PHASE}{requires}" key of MYMETA.json. ## Documentation HTTP-CookieMonster documentation is available as POD. You can run `perldoc` from a shell to read the documentation: % perldoc HTTP::CookieMonster For more information on installing Perl modules via CPAN, please see: https://www.cpan.org/modules/INSTALL.html HTTP-CookieMonster-0.11/MANIFEST000644 000765 000024 00000001205 13615062315 017401 0ustar00olafaldersstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012. CONTRIBUTORS Changes INSTALL LICENSE MANIFEST MANIFEST.SKIP META.json META.yml Makefile.PL README.md cpanfile dist.ini examples/read_cookies.pl lib/HTTP/CookieMonster.pm lib/HTTP/CookieMonster/Cookie.pm perlcriticrc perltidyrc t/00-report-prereqs.dd t/00-report-prereqs.t t/cookie/load.t t/cookie_jar.txt t/load.t t/procedural.t tidyall.ini xt/author/eol.t xt/author/mojibake.t xt/author/pod-coverage.t xt/author/pod-spell.t xt/author/pod-syntax.t xt/author/portability.t xt/author/synopsis.t xt/author/test-version.t xt/author/tidyall.t xt/release/cpan-changes.t HTTP-CookieMonster-0.11/LICENSE000644 000765 000024 00000043652 13615062315 017271 0ustar00olafaldersstaff000000 000000 This software is copyright (c) 2012 by Olaf Alders. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2012 by Olaf Alders. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2012 by Olaf Alders. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End HTTP-CookieMonster-0.11/t/000755 000765 000024 00000000000 13615062315 016515 5ustar00olafaldersstaff000000 000000 HTTP-CookieMonster-0.11/xt/000755 000765 000024 00000000000 13615062315 016705 5ustar00olafaldersstaff000000 000000 HTTP-CookieMonster-0.11/META.yml000644 000765 000024 00000043026 13615062315 017530 0ustar00olafaldersstaff000000 000000 --- abstract: 'Easy read/write access to your jar of HTTP::Cookies' author: - 'Olaf Alders ' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' Test::Fatal: '0' Test::More: '0' perl: '5.006' configure_requires: ExtUtils::MakeMaker: '0' perl: '5.006' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: HTTP-CookieMonster no_index: directory: - examples - t - xt requires: Carp: '0' HTTP::Cookies: '0' Moo: '1.000003' Safe::Isa: '0' Scalar::Util: '0' Sub::Exporter: '0' URI::Escape: '0' perl: '5.006' strict: '0' warnings: '0' resources: Prepan_author: http://prepan.org/user/3Yz7PYrBzQ Prepan_module: http://prepan.org/module/429En4oFdi bugtracker: https://github.com/oalders/http-cookiemonster/issues homepage: https://github.com/oalders/http-cookiemonster repository: https://github.com/oalders/http-cookiemonster.git version: '0.11' x_Dist_Zilla: perl: version: '5.026001' plugins: - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 0 check_all_prereqs: 0 modules: - Dist::Zilla::PluginBundle::Author::OALDERS phase: build run_under_travis: 0 skip: [] name: '@Author::OALDERS/stale modules, build' version: '0.055' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 1 check_all_prereqs: 1 modules: [] phase: release run_under_travis: 0 skip: [] name: '@Author::OALDERS/stale modules, release' version: '0.055' - class: Dist::Zilla::Plugin::OALDERS::TidyAll name: '@Author::OALDERS/OALDERS::TidyAll' version: '0.000026' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Author::OALDERS/AutoPrereqs' version: '6.012' - class: Dist::Zilla::Plugin::CheckChangesHasContent name: '@Author::OALDERS/CheckChangesHasContent' version: '0.011' - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@Author::OALDERS/MakeMaker' version: '6.012' - class: Dist::Zilla::Plugin::CPANFile name: '@Author::OALDERS/CPANFile' version: '6.012' - class: Dist::Zilla::Plugin::ContributorsFile name: '@Author::OALDERS/ContributorsFile' version: 0.3.0 - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::OALDERS/MetaJSON' version: '6.012' - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::OALDERS/MetaYAML' version: '6.012' - class: Dist::Zilla::Plugin::Manifest name: '@Author::OALDERS/Manifest' version: '6.012' - class: Dist::Zilla::Plugin::MetaNoIndex name: '@Author::OALDERS/MetaNoIndex' version: '6.012' - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::OALDERS/MetaConfig' version: '6.012' - class: Dist::Zilla::Plugin::MetaResources name: '@Author::OALDERS/MetaResources' version: '6.012' - class: Dist::Zilla::Plugin::License name: '@Author::OALDERS/License' version: '6.012' - class: Dist::Zilla::Plugin::InstallGuide config: Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000036' version: '0.006' name: '@Author::OALDERS/InstallGuide' version: '1.200013' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@Author::OALDERS/Modules for use with tidyall' version: '6.012' - class: Dist::Zilla::Plugin::ExecDir name: '@Author::OALDERS/ExecDir' version: '6.012' - class: Dist::Zilla::Plugin::Test::PodSpelling config: Dist::Zilla::Plugin::Test::PodSpelling: directories: - bin - lib spell_cmd: '' stopwords: - Alders - "Alders'" - UserAgent - params - spidering wordlist: Pod::Wordlist name: '@Author::OALDERS/Test::PodSpelling' version: '2.007005' - class: Dist::Zilla::Plugin::MojibakeTests name: '@Author::OALDERS/MojibakeTests' version: '0.8' - class: Dist::Zilla::Plugin::PodCoverageTests name: '@Author::OALDERS/PodCoverageTests' version: '6.012' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::OALDERS/PodSyntaxTests' version: '6.012' - class: Dist::Zilla::Plugin::Test::CPAN::Changes config: Dist::Zilla::Plugin::Test::CPAN::Changes: changelog: Changes name: '@Author::OALDERS/Test::CPAN::Changes' version: '0.012' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':ExecFiles' - ':InstallModules' - ':TestFiles' trailing_whitespace: 1 name: '@Author::OALDERS/Test::EOL' version: '0.19' - class: Dist::Zilla::Plugin::Test::Portability config: Dist::Zilla::Plugin::Test::Portability: options: '' name: '@Author::OALDERS/Test::Portability' version: '2.001000' - class: Dist::Zilla::Plugin::TestRelease name: '@Author::OALDERS/TestRelease' version: '6.012' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@Author::OALDERS/Test::ReportPrereqs' version: '0.027' - class: Dist::Zilla::Plugin::Test::Synopsis name: '@Author::OALDERS/Test::Synopsis' version: '2.000007' - class: Dist::Zilla::Plugin::Test::TidyAll name: '@Author::OALDERS/Test::TidyAll' version: '0.04' - class: Dist::Zilla::Plugin::Test::Version name: '@Author::OALDERS/Test::Version' version: '1.09' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@Author::OALDERS/RunExtraTests' version: '0.029' - class: Dist::Zilla::Plugin::MinimumPerl name: '@Author::OALDERS/MinimumPerl' version: '1.006' - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: '4.015' - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: '4.015' - class: Pod::Weaver::Plugin::SingleEncoding name: '@Default/SingleEncoding' version: '4.015' - class: Pod::Weaver::Section::Name name: '@Default/Name' version: '4.015' - class: Pod::Weaver::Section::Version name: '@Default/Version' version: '4.015' - class: Pod::Weaver::Section::Region name: '@Default/prelude' version: '4.015' - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: '4.015' - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: '4.015' - class: Pod::Weaver::Section::Generic name: OVERVIEW version: '4.015' - class: Pod::Weaver::Section::Collect name: ATTRIBUTES version: '4.015' - class: Pod::Weaver::Section::Collect name: METHODS version: '4.015' - class: Pod::Weaver::Section::Collect name: FUNCTIONS version: '4.015' - class: Pod::Weaver::Section::Leftovers name: '@Default/Leftovers' version: '4.015' - class: Pod::Weaver::Section::Region name: '@Default/postlude' version: '4.015' - class: Pod::Weaver::Section::Authors name: '@Default/Authors' version: '4.015' - class: Pod::Weaver::Section::Legal name: '@Default/Legal' version: '4.015' name: '@Author::OALDERS/PodWeaver' version: '4.008' - class: Dist::Zilla::Plugin::PruneCruft name: '@Author::OALDERS/PruneCruft' version: '6.012' - class: Dist::Zilla::Plugin::CopyFilesFromBuild name: '@Author::OALDERS/CopyFilesFromBuild' version: '0.170880' - class: Dist::Zilla::Plugin::GithubMeta name: '@Author::OALDERS/GithubMeta' version: '0.58' - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - Install - LICENSE - META.json - Makefile.PL - README.md - cpanfile exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: '@Author::OALDERS/Git::GatherDir' version: '2.046' - class: Dist::Zilla::Plugin::CopyFilesFromRelease config: Dist::Zilla::Plugin::CopyFilesFromRelease: filename: - Install match: [] name: '@Author::OALDERS/CopyFilesFromRelease' version: '0.006' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - Install - LICENSE - META.json - Makefile.PL - README.md - cpanfile - dist.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.25.0 repo_root: . name: '@Author::OALDERS/Git::Check' version: '2.046' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: git_version: 2.25.0 include_authors: 0 include_releaser: 1 order_by: name paths: [] name: '@Author::OALDERS/Git::Contributors' version: '0.035' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@Author::OALDERS/ReadmeMdInBuild' version: '0.163250' - class: Dist::Zilla::Plugin::StaticInstall config: Dist::Zilla::Plugin::StaticInstall: dry_run: 0 mode: on name: '@Author::OALDERS/StaticInstall' version: '0.012' - class: Dist::Zilla::Plugin::ShareDir name: '@Author::OALDERS/ShareDir' version: '6.012' - class: Dist::Zilla::Plugin::TravisCI::StatusBadge name: '@Author::OALDERS/TravisCI::StatusBadge' version: '0.007' - class: Dist::Zilla::Plugin::CheckIssues name: '@Author::OALDERS/CheckIssues' version: '0.011' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::OALDERS/ConfirmRelease' version: '6.012' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::OALDERS/UploadToCPAN' version: '6.012' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: '@Author::OALDERS/@Git::VersionManager/pluginbundle version' version: '6.012' - class: Dist::Zilla::Plugin::RewriteVersion::Transitional config: Dist::Zilla::Plugin::RewriteVersion: add_tarball_name: 0 finders: - ':ExecFiles' - ':InstallModules' global: 0 skip_version_provider: 0 Dist::Zilla::Plugin::RewriteVersion::Transitional: {} name: '@Author::OALDERS/@Git::VersionManager/RewriteVersion::Transitional' version: '0.009' - class: Dist::Zilla::Plugin::MetaProvides::Update name: '@Author::OALDERS/@Git::VersionManager/MetaProvides::Update' version: '0.007' - class: Dist::Zilla::Plugin::CopyFilesFromRelease config: Dist::Zilla::Plugin::CopyFilesFromRelease: filename: - Changes match: [] name: '@Author::OALDERS/@Git::VersionManager/CopyFilesFromRelease' version: '0.006' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: v%V%n%n%c Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - Install - LICENSE - META.json - Makefile.PL - README.md - cpanfile - dist.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.25.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::OALDERS/@Git::VersionManager/release snapshot' version: '2.046' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: v0.11 tag_format: v%V tag_message: v%V Dist::Zilla::Role::Git::Repo: git_version: 2.25.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::OALDERS/@Git::VersionManager/Git::Tag' version: '2.046' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional config: Dist::Zilla::Plugin::BumpVersionAfterRelease: finders: - ':ExecFiles' - ':InstallModules' global: 0 munge_makefile_pl: 1 Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional: {} name: '@Author::OALDERS/@Git::VersionManager/BumpVersionAfterRelease::Transitional' version: '0.009' - class: Dist::Zilla::Plugin::NextRelease name: '@Author::OALDERS/@Git::VersionManager/NextRelease' version: '6.012' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: 'increment $VERSION after %v release' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Build.PL - Changes - Makefile.PL allow_dirty_match: - (?^:^lib/.*\.pm$) changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.25.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::OALDERS/@Git::VersionManager/post-release commit' version: '2.046' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: git_version: 2.25.0 repo_root: . name: '@Author::OALDERS/Git::Push' version: '2.046' - class: Dist::Zilla::Plugin::PrePAN name: PrePAN version: '0.02' - class: Dist::Zilla::Plugin::Encoding name: Encoding version: '6.012' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: DevelopRequires version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.012' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '6.012' x_contributors: - 'Mohammad S Anwar ' - 'Olaf Alders ' - 'Olaf Alders ' x_generated_by_perl: v5.26.1 x_serialization_backend: 'YAML::Tiny version 1.73' x_static_install: 1 HTTP-CookieMonster-0.11/CONTRIBUTORS000644 000765 000024 00000000477 13615062315 020142 0ustar00olafaldersstaff000000 000000 # HTTP-COOKIEMONSTER CONTRIBUTORS # This is the (likely incomplete) list of people who have helped make this distribution what it is, either via code contributions, patches, bug reports, help with troubleshooting, etc. A huge 'thank you' to all of them. * Mohammad S Anwar * Olaf Alders * Olaf Alders HTTP-CookieMonster-0.11/META.json000644 000765 000024 00000067437 13615062315 017714 0ustar00olafaldersstaff000000 000000 { "abstract" : "Easy read/write access to your jar of HTTP::Cookies", "author" : [ "Olaf Alders " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "HTTP-CookieMonster", "no_index" : { "directory" : [ "examples", "t", "xt" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0", "perl" : "5.006" } }, "develop" : { "recommends" : { "Dist::Zilla::PluginBundle::Git::VersionManager" : "0.007" }, "requires" : { "Code::TidyAll" : "0.71", "Code::TidyAll::Plugin::SortLines::Naturally" : "0.000003", "Code::TidyAll::Plugin::Test::Vars" : "0.04", "Code::TidyAll::Plugin::UniqueLines" : "0.000003", "Parallel::ForkManager" : "1.19", "Perl::Critic" : "1.132", "Perl::Tidy" : "20180220", "Pod::Coverage::TrustPod" : "0", "Pod::Wordlist" : "0", "Test::CPAN::Changes" : "0.19", "Test::Code::TidyAll" : "0.50", "Test::EOL" : "0", "Test::Mojibake" : "0", "Test::More" : "0.96", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", "Test::Portability::Files" : "0", "Test::Spelling" : "0.12", "Test::Synopsis" : "0", "Test::Vars" : "0.014", "Test::Version" : "1", "WWW::Mechanize" : "0" } }, "runtime" : { "requires" : { "Carp" : "0", "HTTP::Cookies" : "0", "Moo" : "1.000003", "Safe::Isa" : "0", "Scalar::Util" : "0", "Sub::Exporter" : "0", "URI::Escape" : "0", "perl" : "5.006", "strict" : "0", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "Test::Fatal" : "0", "Test::More" : "0", "perl" : "5.006" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/oalders/http-cookiemonster/issues" }, "homepage" : "https://github.com/oalders/http-cookiemonster", "repository" : { "type" : "git", "url" : "https://github.com/oalders/http-cookiemonster.git", "web" : "https://github.com/oalders/http-cookiemonster" }, "x_prepan_author" : "http://prepan.org/user/3Yz7PYrBzQ", "x_prepan_module" : "http://prepan.org/module/429En4oFdi" }, "version" : "0.11", "x_Dist_Zilla" : { "perl" : { "version" : "5.026001" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 0, "check_all_prereqs" : 0, "modules" : [ "Dist::Zilla::PluginBundle::Author::OALDERS" ], "phase" : "build", "run_under_travis" : 0, "skip" : [] } }, "name" : "@Author::OALDERS/stale modules, build", "version" : "0.055" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 1, "check_all_prereqs" : 1, "modules" : [], "phase" : "release", "run_under_travis" : 0, "skip" : [] } }, "name" : "@Author::OALDERS/stale modules, release", "version" : "0.055" }, { "class" : "Dist::Zilla::Plugin::OALDERS::TidyAll", "name" : "@Author::OALDERS/OALDERS::TidyAll", "version" : "0.000026" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Author::OALDERS/AutoPrereqs", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", "name" : "@Author::OALDERS/CheckChangesHasContent", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@Author::OALDERS/MakeMaker", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::CPANFile", "name" : "@Author::OALDERS/CPANFile", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ContributorsFile", "name" : "@Author::OALDERS/ContributorsFile", "version" : "0.3.0" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::OALDERS/MetaJSON", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::OALDERS/MetaYAML", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::OALDERS/Manifest", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@Author::OALDERS/MetaNoIndex", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::OALDERS/MetaConfig", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "@Author::OALDERS/MetaResources", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::OALDERS/License", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "config" : { "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000036", "version" : "0.006" } }, "name" : "@Author::OALDERS/InstallGuide", "version" : "1.200013" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@Author::OALDERS/Modules for use with tidyall", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Author::OALDERS/ExecDir", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "config" : { "Dist::Zilla::Plugin::Test::PodSpelling" : { "directories" : [ "bin", "lib" ], "spell_cmd" : "", "stopwords" : [ "Alders", "Alders'", "UserAgent", "params", "spidering" ], "wordlist" : "Pod::Wordlist" } }, "name" : "@Author::OALDERS/Test::PodSpelling", "version" : "2.007005" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@Author::OALDERS/MojibakeTests", "version" : "0.8" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@Author::OALDERS/PodCoverageTests", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::OALDERS/PodSyntaxTests", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "config" : { "Dist::Zilla::Plugin::Test::CPAN::Changes" : { "changelog" : "Changes" } }, "name" : "@Author::OALDERS/Test::CPAN::Changes", "version" : "0.012" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":ExecFiles", ":InstallModules", ":TestFiles" ], "trailing_whitespace" : 1 } }, "name" : "@Author::OALDERS/Test::EOL", "version" : "0.19" }, { "class" : "Dist::Zilla::Plugin::Test::Portability", "config" : { "Dist::Zilla::Plugin::Test::Portability" : { "options" : "" } }, "name" : "@Author::OALDERS/Test::Portability", "version" : "2.001000" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::OALDERS/TestRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@Author::OALDERS/Test::ReportPrereqs", "version" : "0.027" }, { "class" : "Dist::Zilla::Plugin::Test::Synopsis", "name" : "@Author::OALDERS/Test::Synopsis", "version" : "2.000007" }, { "class" : "Dist::Zilla::Plugin::Test::TidyAll", "name" : "@Author::OALDERS/Test::TidyAll", "version" : "0.04" }, { "class" : "Dist::Zilla::Plugin::Test::Version", "name" : "@Author::OALDERS/Test::Version", "version" : "1.09" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@Author::OALDERS/RunExtraTests", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@Author::OALDERS/MinimumPerl", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@Default/SingleEncoding", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@Default/Name", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@Default/Version", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Default/prelude", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OVERVIEW", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "ATTRIBUTES", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "FUNCTIONS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@Default/Leftovers", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Default/postlude", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@Default/Authors", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@Default/Legal", "version" : "4.015" } ] } }, "name" : "@Author::OALDERS/PodWeaver", "version" : "4.008" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Author::OALDERS/PruneCruft", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", "name" : "@Author::OALDERS/CopyFilesFromBuild", "version" : "0.170880" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@Author::OALDERS/GithubMeta", "version" : "0.58" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "Install", "LICENSE", "META.json", "Makefile.PL", "README.md", "cpanfile" ], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "@Author::OALDERS/Git::GatherDir", "version" : "2.046" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", "config" : { "Dist::Zilla::Plugin::CopyFilesFromRelease" : { "filename" : [ "Install" ], "match" : [] } }, "name" : "@Author::OALDERS/CopyFilesFromRelease", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "Install", "LICENSE", "META.json", "Makefile.PL", "README.md", "cpanfile", "dist.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.25.0", "repo_root" : "." } }, "name" : "@Author::OALDERS/Git::Check", "version" : "2.046" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "git_version" : "2.25.0", "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", "paths" : [] } }, "name" : "@Author::OALDERS/Git::Contributors", "version" : "0.035" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@Author::OALDERS/ReadmeMdInBuild", "version" : "0.163250" }, { "class" : "Dist::Zilla::Plugin::StaticInstall", "config" : { "Dist::Zilla::Plugin::StaticInstall" : { "dry_run" : 0, "mode" : "on" } }, "name" : "@Author::OALDERS/StaticInstall", "version" : "0.012" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Author::OALDERS/ShareDir", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::TravisCI::StatusBadge", "name" : "@Author::OALDERS/TravisCI::StatusBadge", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::CheckIssues", "name" : "@Author::OALDERS/CheckIssues", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::OALDERS/ConfirmRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::OALDERS/UploadToCPAN", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "@Author::OALDERS/@Git::VersionManager/pluginbundle version", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::RewriteVersion::Transitional", "config" : { "Dist::Zilla::Plugin::RewriteVersion" : { "add_tarball_name" : 0, "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 0, "skip_version_provider" : 0 }, "Dist::Zilla::Plugin::RewriteVersion::Transitional" : {} }, "name" : "@Author::OALDERS/@Git::VersionManager/RewriteVersion::Transitional", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Update", "name" : "@Author::OALDERS/@Git::VersionManager/MetaProvides::Update", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", "config" : { "Dist::Zilla::Plugin::CopyFilesFromRelease" : { "filename" : [ "Changes" ], "match" : [] } }, "name" : "@Author::OALDERS/@Git::VersionManager/CopyFilesFromRelease", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "v%V%n%n%c" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "Install", "LICENSE", "META.json", "Makefile.PL", "README.md", "cpanfile", "dist.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.25.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::OALDERS/@Git::VersionManager/release snapshot", "version" : "2.046" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "v0.11", "tag_format" : "v%V", "tag_message" : "v%V" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.25.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::OALDERS/@Git::VersionManager/Git::Tag", "version" : "2.046" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 0, "munge_makefile_pl" : 1 }, "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : {} }, "name" : "@Author::OALDERS/@Git::VersionManager/BumpVersionAfterRelease::Transitional", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::OALDERS/@Git::VersionManager/NextRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "increment $VERSION after %v release" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Build.PL", "Changes", "Makefile.PL" ], "allow_dirty_match" : [ "(?^:^lib/.*\\.pm$)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.25.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::OALDERS/@Git::VersionManager/post-release commit", "version" : "2.046" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.25.0", "repo_root" : "." } }, "name" : "@Author::OALDERS/Git::Push", "version" : "2.046" }, { "class" : "Dist::Zilla::Plugin::PrePAN", "name" : "PrePAN", "version" : "0.02" }, { "class" : "Dist::Zilla::Plugin::Encoding", "name" : "Encoding", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "DevelopRequires", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.012" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.012" } }, "x_contributors" : [ "Mohammad S Anwar ", "Olaf Alders ", "Olaf Alders " ], "x_generated_by_perl" : "v5.26.1", "x_serialization_backend" : "Cpanel::JSON::XS version 4.10", "x_static_install" : 1 } HTTP-CookieMonster-0.11/README.md000644 000765 000024 00000014512 13615062315 017534 0ustar00olafaldersstaff000000 000000 # NAME HTTP::CookieMonster - Easy read/write access to your jar of HTTP::Cookies # VERSION version 0.11 # SYNOPSIS # Use the functional interface for quick read-only access use HTTP::CookieMonster qw( cookies ); use WWW::Mechanize; my $mech = WWW::Mechanize->new; my $url = 'https://www.nytimes.com'; $mech->get( $url ); my @cookies = cookies( $mech->cookie_jar ); my $cookie = cookies( $mech->cookie_jar, 'RMID' ); print $cookie->val; # Use the OO interface for read/write access use HTTP::CookieMonster; my $monster = HTTP::CookieMonster->new( $mech->cookie_jar ); my $cookie = $monster->get_cookie('RMID'); print $cookie->val; $cookie->val('random stuff'); $monster->set_cookie( $cookie ); # now fetch page using mangled cookie $mech->get( $url ); # DESCRIPTION This module was created because messing around with [HTTP::Cookies](https://metacpan.org/pod/HTTP::Cookies) is non-trivial. [HTTP::Cookies](https://metacpan.org/pod/HTTP::Cookies) a very useful module, but using it is not always as easy and clean as it could be. For instance, if you want to find a particular cookie, you can't just ask for it by name. Instead, you have to use a callback: $cookie_jar->scan( \&callback ) The callback will be invoked with 11 positional parameters: 0 version 1 key 2 val 3 path 4 domain 5 port 6 path_spec 7 secure 8 expires 9 discard 10 hash That's a lot to remember and it doesn't make for very readable code. Now, let's say you want to save or update a cookie. Now you're back to the many positional params yet again: $cookie_jar->set_cookie( $version, $key, $val, $path, $domain, $port, $path_spec, $secure, $maxage, $discard, \%rest ) Also not readable. Unless you have an amazing memory, you may find yourself checking the docs regularly to see if you did, in fact, get all those params in the correct order etc. HTTP::CookieMonster gives you a simple interface for getting and setting cookies. You can fetch an ARRAY of all your cookies: my @all_cookies = $monster->all_cookies; foreach my $cookie ( @all_cookies ) { print $cookie->key; print $cookie->val; print $cookie->secure; print $cookie->domain; # etc } Or, if you know for a fact exactly what will be in your cookie jar, you can fetch a cookie by name. my $cookie = $monster->get_cookie( 'plack_session' ); This gives you fast access to a cookie without a callback, iterating over a list etc. It's good for quick hacks and you can dump the cookie quite easily to inspect its contents in a highly readable way: use Data::Printer; p $cookie; If you want to mangle the cookie before the next request, that's easy too. $cookie->val('woohoo'); $monster->set_cookie( $cookie ); $mech->get( $url ); Or, add an entirely new cookie to the jar: use HTTP::CookieMonster::Cookie; my $cookie = HTTP::CookieMonster::Cookie->new( key => 'cookie-name', val => 'cookie-val', path => '/', domain => '.somedomain.org', path_spec => 1, secure => 0, expires => 1376081877 ); $monster->set_cookie( $cookie ); $mech->get( $url ); ## new new() takes just one required parameter, which is cookie\_jar, a valid [HTTP::Cookies](https://metacpan.org/pod/HTTP::Cookies) object. my $monster = HTTP::CookieMonster->new( $mech->cookie_jar ); ## cookie\_jar A reader which returns an [HTTP::Cookies](https://metacpan.org/pod/HTTP::Cookies) object. ## all\_cookies Returns an ARRAY of all cookies in the cookie jar, represented as [HTTP::CookieMonster::Cookie](https://metacpan.org/pod/HTTP::CookieMonster::Cookie) objects. my @cookies = $monster->all_cookies; foreach my $cookie ( @cookies ) { print $cookie->key; } ## set\_cookie( $cookie ) Sets a cookie and updates the cookie jar. Requires a [HTTP::CookieMonster::Cookie](https://metacpan.org/pod/HTTP::CookieMonster::Cookie) object. my $monster = HTTP::CookieMonster->new( $mech->cookie_jar ); my $s = $monster->get_cookie('session'); $s->val('random_string'); $monster->set_cookie( $s ); # You can also add an entirely new cookie to the jar via this method use HTTP::CookieMonster::Cookie; my $cookie = HTTP::CookieMonster::Cookie->new( key => 'cookie-name', val => 'cookie-val', path => '/', domain => '.somedomain.org', path_spec => 1, secure => 0, expires => 1376081877 ); $monster->set_cookie( $cookie ); ## delete\_cookie( $cookie ) Deletes a cookie and updates the cookie jar. Requires a [HTTP::CookieMonster::Cookie](https://metacpan.org/pod/HTTP::CookieMonster::Cookie) object. ## get\_cookie( $name ) Be aware that this method may surprise you by what it returns. When called in scalar context, get\_cookie() returns the first cookie which exactly matches the name supplied. In many cases this will be exactly what you want, but that won't always be the case. If you are spidering multiple web sites with the same UserAgent object, be aware that you'll likely have cookies from multiple sites in your cookie jar. In this case asking for get\_cookie('session') in scalar context may not return the cookie which you were expecting. You will be safer calling get\_cookie() in list context: $monster = HTTP::CookieMonster->new( $mech->cookie_jar ); # first cookie with this name my $first_session = $monster->get_cookie('session'); # all cookies with this name my @all_sessions = $monster->get_cookie('session'); # FUNCTIONAL/PROCEDURAL INTERFACE ## cookies This function will DWIM. Here are some examples: use HTTP::CookieMonster qw( cookies ); # get all cookies in your jar my @cookies = cookies( $mech->cookie_jar ); # get all cookies of a certain name/key my @session_cookies = cookies( $mech->cookie_jar, 'session_cookie_name' ); # get the first cookie of a certain name/key my $first_session_cookie = cookies( $mech->cookie_jar, 'session_cookie_name' ); # AUTHOR Olaf Alders # COPYRIGHT AND LICENSE This software is copyright (c) 2012 by Olaf Alders. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. HTTP-CookieMonster-0.11/examples/000755 000765 000024 00000000000 13615062315 020070 5ustar00olafaldersstaff000000 000000 HTTP-CookieMonster-0.11/tidyall.ini000644 000765 000024 00000000445 13615062315 020420 0ustar00olafaldersstaff000000 000000 [PerlTidy] select = **/*.{pl,pm,t,psgi} ignore = .build/**/* ignore = HTTP-CookieMonster-*/**/* ignore = blib/**/* ignore = t/00-* ignore = t/author-* ignore = t/release-* ignore = t/zzz-* ignore = xt/**/* argv = --profile=$ROOT/perltidyrc [SortLines] select = .gitignore select = .stopwords HTTP-CookieMonster-0.11/lib/000755 000765 000024 00000000000 13615062315 017020 5ustar00olafaldersstaff000000 000000 HTTP-CookieMonster-0.11/Makefile.PL000644 000765 000024 00000003055 13615062315 020227 0ustar00olafaldersstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012. use strict; use warnings; use 5.006; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Easy read/write access to your jar of HTTP::Cookies", "AUTHOR" => "Olaf Alders ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "HTTP-CookieMonster", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.006", "NAME" => "HTTP::CookieMonster", "PREREQ_PM" => { "Carp" => 0, "HTTP::Cookies" => 0, "Moo" => "1.000003", "Safe::Isa" => 0, "Scalar::Util" => 0, "Sub::Exporter" => 0, "URI::Escape" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "Test::Fatal" => 0, "Test::More" => 0 }, "VERSION" => "0.11", "test" => { "TESTS" => "t/*.t t/cookie/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "HTTP::Cookies" => 0, "Moo" => "1.000003", "Safe::Isa" => 0, "Scalar::Util" => 0, "Sub::Exporter" => 0, "Test::Fatal" => 0, "Test::More" => 0, "URI::Escape" => 0, "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); HTTP-CookieMonster-0.11/dist.ini000644 000765 000024 00000000675 13615062315 017726 0ustar00olafaldersstaff000000 000000 name = HTTP-CookieMonster author = Olaf Alders license = Perl_5 copyright_holder = Olaf Alders copyright_year = 2012 [@Author::OALDERS] StaticInstall.mode = on StaticInstall.dry_run = 0 [PrePAN] author = http://prepan.org/user/3Yz7PYrBzQ module = http://prepan.org/module/429En4oFdi [Encoding] encoding = bytes filename = t/cookie_jar.txt [Prereqs / DevelopRequires] WWW::Mechanize = 0 ; used in SYNOPSIS test HTTP-CookieMonster-0.11/lib/HTTP/000755 000765 000024 00000000000 13615062315 017577 5ustar00olafaldersstaff000000 000000 HTTP-CookieMonster-0.11/lib/HTTP/CookieMonster/000755 000765 000024 00000000000 13615062315 022360 5ustar00olafaldersstaff000000 000000 HTTP-CookieMonster-0.11/lib/HTTP/CookieMonster.pm000644 000765 000024 00000023331 13615062315 022720 0ustar00olafaldersstaff000000 000000 package HTTP::CookieMonster; our $VERSION = '0.11'; use strict; use warnings; use 5.006; use Moo 1.000003; use Carp qw( croak ); use HTTP::Cookies; use HTTP::CookieMonster::Cookie; use Safe::Isa; use Scalar::Util qw( reftype ); use Sub::Exporter -setup => { exports => ['cookies'] }; use URI::Escape qw( uri_escape uri_unescape ); my @_cookies = (); has 'cookie_jar' => ( required => 1, is => 'ro', isa => sub { croak 'HTTP::Cookies object expected' if !$_[0]->$_isa('HTTP::Cookies'); }, ); sub BUILDARGS { my ( $class, @args ) = @_; return { cookie_jar => shift @args } if @args == 1; return {@args}; } # all_cookies() is now a straight method rather than a Moo accessor in order to # prevent the all_cookies list from getting out of sync with changes to the # cookie_jar which happen outside of this module. Rather than trying to detect # changes, we'll just create a fresh list each time. Performance penalties # should be minimal and this keeps things simple. sub all_cookies { my $self = shift; @_cookies = (); $self->cookie_jar->scan( \&_check_cookies ); wantarray ? return @_cookies : return \@_cookies; } # my $cookie = cookies( $jar ); -- first cookie (makes no sense) # my $session = cookies( $jar, 'session' ); # my @cookies = cookies( $jar ); # my @sessions = cookies( $jar, 'session' ); sub cookies { my ( $cookie_jar, $name ) = @_; croak 'This function is not part of the OO interface' if $cookie_jar->$_isa('HTTP::CookieMonster'); my $monster = HTTP::CookieMonster->new($cookie_jar); if ( !$name ) { if ( !wantarray ) { croak 'Please specify a cookie name when asking for a single cookie'; } return @{ $monster->all_cookies }; } return $monster->get_cookie($name); } sub get_cookie { my $self = shift; my $name = shift; my @cookies = (); foreach my $cookie ( $self->all_cookies ) { if ( $cookie->key eq $name ) { return $cookie if !wantarray; push @cookies, $cookie; } } return shift @cookies if !wantarray; return @cookies; } sub set_cookie { my $self = shift; my $cookie = shift; if ( !$cookie ) { croak 'Missing cookie, an HTTP::CookieMonster::Cookie object'; } if ( !$cookie->$_isa('HTTP::CookieMonster::Cookie') ) { croak "$cookie is not a HTTP::CookieMonster::Cookie object"; } return $self->cookie_jar->set_cookie( $cookie->version, $cookie->key, uri_escape( $cookie->val ), $cookie->path, $cookie->domain, $cookie->port, $cookie->path_spec, $cookie->secure, $cookie->expires, $cookie->discard, $cookie->hash ) ? 1 : 0; } sub delete_cookie { my $self = shift; my $cookie = shift; if ( !$cookie->$_isa('HTTP::CookieMonster::Cookie') ) { croak "$cookie is not a HTTP::CookieMonster::Cookie object"; } $cookie->expires(-1); return $self->set_cookie($cookie); } sub _check_cookies { my @args = @_; push @_cookies, HTTP::CookieMonster::Cookie->new( version => $args[0], key => $args[1], val => uri_unescape( $args[2] ), path => $args[3], domain => $args[4], port => $args[5], path_spec => $args[6], secure => $args[7], expires => $args[8], discard => $args[9], hash => $args[10], ); return; } 1; # ABSTRACT: Easy read/write access to your jar of HTTP::Cookies # __END__ =pod =encoding UTF-8 =head1 NAME HTTP::CookieMonster - Easy read/write access to your jar of HTTP::Cookies =head1 VERSION version 0.11 =head1 SYNOPSIS # Use the functional interface for quick read-only access use HTTP::CookieMonster qw( cookies ); use WWW::Mechanize; my $mech = WWW::Mechanize->new; my $url = 'https://www.nytimes.com'; $mech->get( $url ); my @cookies = cookies( $mech->cookie_jar ); my $cookie = cookies( $mech->cookie_jar, 'RMID' ); print $cookie->val; # Use the OO interface for read/write access use HTTP::CookieMonster; my $monster = HTTP::CookieMonster->new( $mech->cookie_jar ); my $cookie = $monster->get_cookie('RMID'); print $cookie->val; $cookie->val('random stuff'); $monster->set_cookie( $cookie ); # now fetch page using mangled cookie $mech->get( $url ); =head1 DESCRIPTION This module was created because messing around with L is non-trivial. L a very useful module, but using it is not always as easy and clean as it could be. For instance, if you want to find a particular cookie, you can't just ask for it by name. Instead, you have to use a callback: $cookie_jar->scan( \&callback ) The callback will be invoked with 11 positional parameters: 0 version 1 key 2 val 3 path 4 domain 5 port 6 path_spec 7 secure 8 expires 9 discard 10 hash That's a lot to remember and it doesn't make for very readable code. Now, let's say you want to save or update a cookie. Now you're back to the many positional params yet again: $cookie_jar->set_cookie( $version, $key, $val, $path, $domain, $port, $path_spec, $secure, $maxage, $discard, \%rest ) Also not readable. Unless you have an amazing memory, you may find yourself checking the docs regularly to see if you did, in fact, get all those params in the correct order etc. HTTP::CookieMonster gives you a simple interface for getting and setting cookies. You can fetch an ARRAY of all your cookies: my @all_cookies = $monster->all_cookies; foreach my $cookie ( @all_cookies ) { print $cookie->key; print $cookie->val; print $cookie->secure; print $cookie->domain; # etc } Or, if you know for a fact exactly what will be in your cookie jar, you can fetch a cookie by name. my $cookie = $monster->get_cookie( 'plack_session' ); This gives you fast access to a cookie without a callback, iterating over a list etc. It's good for quick hacks and you can dump the cookie quite easily to inspect its contents in a highly readable way: use Data::Printer; p $cookie; If you want to mangle the cookie before the next request, that's easy too. $cookie->val('woohoo'); $monster->set_cookie( $cookie ); $mech->get( $url ); Or, add an entirely new cookie to the jar: use HTTP::CookieMonster::Cookie; my $cookie = HTTP::CookieMonster::Cookie->new( key => 'cookie-name', val => 'cookie-val', path => '/', domain => '.somedomain.org', path_spec => 1, secure => 0, expires => 1376081877 ); $monster->set_cookie( $cookie ); $mech->get( $url ); =head2 new new() takes just one required parameter, which is cookie_jar, a valid L object. my $monster = HTTP::CookieMonster->new( $mech->cookie_jar ); =head2 cookie_jar A reader which returns an L object. =head2 all_cookies Returns an ARRAY of all cookies in the cookie jar, represented as L objects. my @cookies = $monster->all_cookies; foreach my $cookie ( @cookies ) { print $cookie->key; } =head2 set_cookie( $cookie ) Sets a cookie and updates the cookie jar. Requires a L object. my $monster = HTTP::CookieMonster->new( $mech->cookie_jar ); my $s = $monster->get_cookie('session'); $s->val('random_string'); $monster->set_cookie( $s ); # You can also add an entirely new cookie to the jar via this method use HTTP::CookieMonster::Cookie; my $cookie = HTTP::CookieMonster::Cookie->new( key => 'cookie-name', val => 'cookie-val', path => '/', domain => '.somedomain.org', path_spec => 1, secure => 0, expires => 1376081877 ); $monster->set_cookie( $cookie ); =head2 delete_cookie( $cookie ) Deletes a cookie and updates the cookie jar. Requires a L object. =head2 get_cookie( $name ) Be aware that this method may surprise you by what it returns. When called in scalar context, get_cookie() returns the first cookie which exactly matches the name supplied. In many cases this will be exactly what you want, but that won't always be the case. If you are spidering multiple web sites with the same UserAgent object, be aware that you'll likely have cookies from multiple sites in your cookie jar. In this case asking for get_cookie('session') in scalar context may not return the cookie which you were expecting. You will be safer calling get_cookie() in list context: $monster = HTTP::CookieMonster->new( $mech->cookie_jar ); # first cookie with this name my $first_session = $monster->get_cookie('session'); # all cookies with this name my @all_sessions = $monster->get_cookie('session'); =head1 FUNCTIONAL/PROCEDURAL INTERFACE =head2 cookies This function will DWIM. Here are some examples: use HTTP::CookieMonster qw( cookies ); # get all cookies in your jar my @cookies = cookies( $mech->cookie_jar ); # get all cookies of a certain name/key my @session_cookies = cookies( $mech->cookie_jar, 'session_cookie_name' ); # get the first cookie of a certain name/key my $first_session_cookie = cookies( $mech->cookie_jar, 'session_cookie_name' ); =for Pod::Coverage BUILDARGS =head1 AUTHOR Olaf Alders =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2012 by Olaf Alders. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut HTTP-CookieMonster-0.11/lib/HTTP/CookieMonster/Cookie.pm000644 000765 000024 00000006553 13615062315 024140 0ustar00olafaldersstaff000000 000000 package HTTP::CookieMonster::Cookie; our $VERSION = '0.11'; use strict; use warnings; use Moo; # in order of args required in $cookie_jar->scan callback has 'version' => ( is => 'rw', ); has 'key' => ( is => 'rw', ); has 'val' => ( is => 'rw', ); has 'path' => ( is => 'rw', ); has 'domain' => ( is => 'rw', ); has 'port' => ( is => 'rw', ); has 'path_spec' => ( is => 'rw', ); has 'secure' => ( is => 'rw', ); has 'expires' => ( is => 'rw', ); has 'discard' => ( is => 'rw', ); has 'hash' => ( is => 'rw', ); 1; # ABSTRACT: Cookie representation used by HTTP::CookieMonster __END__ =pod =encoding UTF-8 =head1 NAME HTTP::CookieMonster::Cookie - Cookie representation used by HTTP::CookieMonster =head1 VERSION version 0.11 =head1 SYNOPSIS use HTTP::CookieMonster::Cookie; my $cookie = HTTP::CookieMonster::Cookie->new( key => 'cookie-name', val => 'cookie-val', path => '/', domain => '.somedomain.org', path_spec => 1, secure => 0, expires => 1376081877 ); use WWW::Mechanize; use HTTP::CookieMonster; my $mech = WWW::Mechanize->new; my $monster = HTTP::CookieMonster->new( cookie_jar => $mech->cookie_jar ); $monster->set_cookie( $cookie ); $mech->get('https://example.com'); # passes $cookie in request =head1 DESCRIPTION This module is intended to be used by L to represent cookies found in an L cookie_jar. To keep things familiar, I have chosen method names which reflect the positional parameter names laid out in the $cookie_jar->scan( \&callback ) documentation. Not being intimately familiar with the HTTP cookie spec, I haven't forced validation or default values on any attributes, so please be aware that the burden is on the user to provide "correct" data if you are using this module directly. I have provided some sample values below. To get a better idea of what is required, try visiting a few sites and dumping their cookies. use Data::Printer; my $mech = WWW::Mechanize->new; $mech->get( 'http://www.google.ca' ); my $monster = HTTP::CookieMonster->new( cookie_jar => $mech->cookie_jar ); p $monster->all_cookies; =head2 version $cookie->version( 0 ); =head2 key The name of the cookie. $cookie->key( "session_id" ); =head2 val The value of the cookie. $cookie->val( "random_stuff" ); If you are creating a new cookie, you should escape the value first. use URI::Escape qw( uri_escape ); $cookie->value( uri_escape( 'random_stuff' ) ); =head2 path $cookie->path( "/" ); =head2 domain $cookie->domain( ".google.ca" ); =head2 port =head2 path_spec $cookie->path_spec( 1 ); =head2 secure $cookie->secure( 1 ); =head2 expires $cookie->expires( 1407696193 ); =head2 discard =head2 hash $cookie->hash( { HttpOnly => undef } ); =head1 SEE ALSO This is mainly useful for creating cookies to be used by L and L classes. If you need to create cookies to set via headers, have a look at L. =head1 AUTHOR Olaf Alders =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2012 by Olaf Alders. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut HTTP-CookieMonster-0.11/examples/read_cookies.pl000644 000765 000024 00000000704 13615062315 023055 0ustar00olafaldersstaff000000 000000 #!/usr/bin/env perl use strict; use warnings; use HTTP::CookieMonster qw( cookies ); use URI::Heuristic qw(uf_uristr); use WWW::Mechanize; die 'usage perl examples/read_cookies.pl http://www.nytimes.com' if !@ARGV; my $url = uf_uristr( shift @ARGV ); my $mech = WWW::Mechanize->new; $mech->get($url); my @cookies = cookies( $mech->cookie_jar ); foreach my $cookie (@cookies) { printf( "name: %s\tvalue: %s\n", $cookie->key, $cookie->val ); } HTTP-CookieMonster-0.11/xt/author/000755 000765 000024 00000000000 13615062315 020207 5ustar00olafaldersstaff000000 000000 HTTP-CookieMonster-0.11/xt/release/000755 000765 000024 00000000000 13615062315 020325 5ustar00olafaldersstaff000000 000000 HTTP-CookieMonster-0.11/xt/release/cpan-changes.t000644 000765 000024 00000000344 13615062315 023042 0ustar00olafaldersstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CPAN::Changes 0.012 use Test::More 0.96 tests => 1; use Test::CPAN::Changes; subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; HTTP-CookieMonster-0.11/xt/author/tidyall.t000644 000765 000024 00000000522 13615062315 022035 0ustar00olafaldersstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Test::TidyAll v$VERSION use Test::More 0.88; use Test::Code::TidyAll 0.24; tidyall_ok( verbose => ( exists $ENV{TEST_TIDYALL_VERBOSE} ? $ENV{TEST_TIDYALL_VERBOSE} : 0 ), jobs => ( exists $ENV{TEST_TIDYALL_JOBS} ? $ENV{TEST_TIDYALL_JOBS} : 1 ), ); done_testing; HTTP-CookieMonster-0.11/xt/author/mojibake.t000644 000765 000024 00000000151 13615062315 022152 0ustar00olafaldersstaff000000 000000 #!perl use strict; use warnings qw(all); use Test::More; use Test::Mojibake; all_files_encoding_ok(); HTTP-CookieMonster-0.11/xt/author/test-version.t000644 000765 000024 00000000637 13615062315 023044 0ustar00olafaldersstaff000000 000000 use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::Version 1.09 use Test::Version; my @imports = qw( version_all_ok ); my $params = { is_strict => 0, has_version => 1, multiple => 0, }; push @imports, $params if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; HTTP-CookieMonster-0.11/xt/author/synopsis.t000644 000765 000024 00000000060 13615062315 022257 0ustar00olafaldersstaff000000 000000 #!perl use Test::Synopsis; all_synopsis_ok(); HTTP-CookieMonster-0.11/xt/author/eol.t000644 000765 000024 00000000642 13615062315 021155 0ustar00olafaldersstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.19 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/HTTP/CookieMonster.pm', 'lib/HTTP/CookieMonster/Cookie.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/cookie/load.t', 't/load.t', 't/procedural.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; HTTP-CookieMonster-0.11/xt/author/pod-syntax.t000644 000765 000024 00000000252 13615062315 022501 0ustar00olafaldersstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); HTTP-CookieMonster-0.11/xt/author/portability.t000644 000765 000024 00000000267 13615062315 022743 0ustar00olafaldersstaff000000 000000 use strict; use warnings; use Test::More; eval 'use Test::Portability::Files'; plan skip_all => 'Test::Portability::Files required for testing portability' if $@; run_tests(); HTTP-CookieMonster-0.11/xt/author/pod-spell.t000644 000765 000024 00000000516 13615062315 022275 0ustar00olafaldersstaff000000 000000 use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007005 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ Alders Alders' Anwar Cookie CookieMonster HTTP Mohammad Olaf UserAgent lib mohammad olaf params spidering HTTP-CookieMonster-0.11/xt/author/pod-coverage.t000644 000765 000024 00000000334 13615062315 022747 0ustar00olafaldersstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use Test::Pod::Coverage 1.08; use Pod::Coverage::TrustPod; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); HTTP-CookieMonster-0.11/t/cookie_jar.txt000644 000765 000024 00000000731 13615062315 021364 0ustar00olafaldersstaff000000 000000 #LWP-Cookies-1.0 Set-Cookie3: nyt-a=KJYRtF9m4Yq7laMR_rUF94; path="/"; domain=.nytimes.com; path_spec; expires="2021-01-30 16:32:02Z"; version=0 Set-Cookie3: nyt-gdpr=0; path="/"; domain=.nytimes.com; path_spec; expires="2020-01-31 22:32:02Z"; version=0 Set-Cookie3: nyt-geo=CA; path="/"; domain=.nytimes.com; path_spec; expires="2020-01-31 22:32:02Z"; version=0 Set-Cookie3: nyt-purr=cfh; path="/"; domain=.nytimes.com; path_spec; expires="2021-01-30 16:32:02Z"; version=0 HTTP-CookieMonster-0.11/t/load.t000644 000765 000024 00000003667 13615062315 017635 0ustar00olafaldersstaff000000 000000 #!/usr/bin/env perl use strict; use warnings; use HTTP::CookieMonster (); use HTTP::Cookies (); use Scalar::Util qw( reftype ); use Test::More; my $jar = HTTP::Cookies->new( file => 't/cookie_jar.txt' ); my $obj = HTTP::CookieMonster->new( cookie_jar => $jar ); ok( $obj, 'can create object with 2 args' ); my $monster = HTTP::CookieMonster->new($jar); ok( $monster, 'got a monster' ); ok( $monster->all_cookies, 'all cookies' ); is( reftype $monster->all_cookies, 'ARRAY', 'all cookies returns arrayref in scalar context' ); my @all_cookies = $monster->all_cookies; is( scalar @all_cookies, 4, 'all cookies returns array in list context' ); my $all_cookies = $monster->all_cookies; ok( $monster->get_cookie('nyt-geo'), 'got a single cookie' ); my $rmid = $monster->get_cookie('nyt-geo'); $rmid->val('random'); is $monster->set_cookie($rmid), 1, 'can set cookie'; # try adding a new cookie to the jar my %args = ( version => 0, key => 'foo', val => 'bar', path => '/', domain => '.metacpan.org', port => 80, path_spec => 1, secure => 1, expires => 1376081877, discard => undef, hash => {}, ); my $cookie = HTTP::CookieMonster::Cookie->new(%args); ok( $monster->set_cookie($cookie), 'can set a cookie' ); my $cookie2 = HTTP::CookieMonster::Cookie->new( %args, domain => 'foo.metacpan.org' ); ok( $monster->set_cookie($cookie2), 'can set a second cookie' ); my $first_cookie = $monster->get_cookie('foo'); isa_ok( $first_cookie, 'HTTP::CookieMonster::Cookie' ); { my @all_foo_cookies = $monster->get_cookie('foo'); my $count = @all_foo_cookies; is( $count, 2, 'there are 2 foo cookies' ); } ok( $monster->delete_cookie($cookie), 'delete returns true' ); { my @all_foo_cookies = $monster->get_cookie('foo'); my $count = @all_foo_cookies; is( $count, 1, '1 foo cookie deleted' ); } done_testing(); HTTP-CookieMonster-0.11/t/procedural.t000755 000765 000024 00000003213 13615062315 021044 0ustar00olafaldersstaff000000 000000 #!/usr/bin/env perl use strict; use warnings; use HTTP::CookieMonster qw( cookies ); use HTTP::Cookies (); use Test::Fatal qw( exception ); use Test::More; my $jar = HTTP::Cookies->new( file => 't/cookie_jar.txt' ); # 1) my $cookie = cookies( $jar ); -- first cookie (makes no sense) # 2) my $session = cookies( $jar, 'session' ); # 3) my @cookies = cookies( $jar ); # 4) my @sessions = cookies( $jar, 'session' ); # case 1 ok( exception { my $cookies = cookies($jar) }, 'cookie name required in scalar context' ); # case 2 my $rmid = cookies( $jar, 'nyt-geo' ); isa_ok( $rmid, 'HTTP::CookieMonster::Cookie' ); # case 3 my @all_cookies = cookies($jar); is( scalar @all_cookies, 4, 'all cookies returns array in list context' ); # case 4 my @sessions = cookies( $jar, 'nyt-geo' ); is( scalar @sessions, 1, 'returns one nyt-geo in array context' ); isa_ok( $sessions[0], 'HTTP::CookieMonster::Cookie' ); # now let's try 2 nyt-geo cookies my $new_cookie = HTTP::CookieMonster::Cookie->new( version => 0, key => 'nyt-geo', val => 'bar', path => '/', domain => '.metacpan.org', port => 80, path_spec => 1, secure => 1, expires => 1376081877, discard => undef, hash => {}, ); my $monster = HTTP::CookieMonster->new($jar); $monster->set_cookie($new_cookie); ok( exception { $monster->set_cookie() }, 'cookie required when calling set_cookie()' ); @sessions = cookies( $jar, 'nyt-geo' ); is( scalar @sessions, 2, 'returns two nyt-geos in array context' ); foreach my $session (@sessions) { isa_ok( $sessions[0], 'HTTP::CookieMonster::Cookie' ); } done_testing(); HTTP-CookieMonster-0.11/t/00-report-prereqs.t000644 000765 000024 00000013426 13615062315 022117 0ustar00olafaldersstaff000000 000000 #!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if $mod eq 'perl'; next if grep { $_ eq $mod } @exclude; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( $cpan_meta_error || @dep_errors ) { diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; } if ( $cpan_meta_error ) { my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; } if ( @dep_errors ) { diag join("\n", "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=4 sts=4 sw=4 et: HTTP-CookieMonster-0.11/t/cookie/000755 000765 000024 00000000000 13615062315 017766 5ustar00olafaldersstaff000000 000000 HTTP-CookieMonster-0.11/t/00-report-prereqs.dd000644 000765 000024 00000006427 13615062315 022246 0ustar00olafaldersstaff000000 000000 do { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0', 'perl' => '5.006' } }, 'develop' => { 'recommends' => { 'Dist::Zilla::PluginBundle::Git::VersionManager' => '0.007' }, 'requires' => { 'Code::TidyAll' => '0.71', 'Code::TidyAll::Plugin::SortLines::Naturally' => '0.000003', 'Code::TidyAll::Plugin::Test::Vars' => '0.04', 'Code::TidyAll::Plugin::UniqueLines' => '0.000003', 'Parallel::ForkManager' => '1.19', 'Perl::Critic' => '1.132', 'Perl::Tidy' => '20180220', 'Pod::Coverage::TrustPod' => '0', 'Pod::Wordlist' => '0', 'Test::CPAN::Changes' => '0.19', 'Test::Code::TidyAll' => '0.50', 'Test::EOL' => '0', 'Test::Mojibake' => '0', 'Test::More' => '0.96', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.08', 'Test::Portability::Files' => '0', 'Test::Spelling' => '0.12', 'Test::Synopsis' => '0', 'Test::Vars' => '0.014', 'Test::Version' => '1', 'WWW::Mechanize' => '0' } }, 'runtime' => { 'requires' => { 'Carp' => '0', 'HTTP::Cookies' => '0', 'Moo' => '1.000003', 'Safe::Isa' => '0', 'Scalar::Util' => '0', 'Sub::Exporter' => '0', 'URI::Escape' => '0', 'perl' => '5.006', 'strict' => '0', 'warnings' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'Test::Fatal' => '0', 'Test::More' => '0', 'perl' => '5.006' } } }; $x; }HTTP-CookieMonster-0.11/t/cookie/load.t000644 000765 000024 00000000736 13615062315 021100 0ustar00olafaldersstaff000000 000000 #!/usr/bin/env perl use strict; use warnings; use HTTP::CookieMonster::Cookie (); use Test::More; my $cookie = HTTP::CookieMonster::Cookie->new( version => 0, key => 'foo', val => 'bar', path => '/', domain => '.metacpan.org', port => 80, path_spec => 1, secure => 1, expires => 1376081877, discard => undef, hash => {}, ); isa_ok( $cookie, 'HTTP::CookieMonster::Cookie' ); done_testing();