HTTP-Date-6.08 000755 001750 001751 0 15223600650 12126 5 ustar 00olaf olaf 000000 000000 LICENSE 100644 001750 001751 46270 15223600650 13245 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08 This software is copyright (c) 1995 by Gisle Aas.
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) 1995 by Gisle Aas.
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.
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, see .
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
Moe Ghoul, President of Vice
That's all there is to it!
--- The Perl Artistic License 1.0 ---
This software is Copyright (c) 1995 by Gisle Aas.
This is free software, licensed under:
The Perl 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 as specified below.
"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 uunet.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) give non-standard executables non-standard names, and clearly
document 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. You may embed this Package's interpreter within
an executable of yours (by linking); this shall be construed as a mere
form of aggregation, provided that the complete Standard Version of the
interpreter is so embedded.
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 whoever generated
them, and may be sold commercially, and may be aggregated with this
Package. If such scripts or library files are aggregated with this
Package via the so-called "undump" or "unexec" methods of producing a
binary executable image, then distribution of such an image shall
neither be construed as a distribution of this Package nor shall it
fall under the restrictions of Paragraphs 3 and 4, provided that you do
not represent such an executable image as a Standard Version of this
Package.
7. C subroutines (or comparably compiled subroutines in other
languages) supplied by you and linked into this Package in order to
emulate subroutines and variables of the language defined by this
Package shall not be considered part of this Package, but are the
equivalent of input as in Paragraph 6, provided these subroutines do
not change the language in any way that would cause it to fail the
regression tests for the language.
8. Aggregation of this Package with a commercial distribution is always
permitted provided that the use of this Package is embedded; that is,
when no overt attempt is made to make this Package's interfaces visible
to the end user of the commercial distribution. Such use shall not be
construed as a distribution of this Package.
9. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.
10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End
INSTALL 100644 001750 001751 4526 15223600650 13247 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08 This is the Perl distribution HTTP-Date.
Installing HTTP-Date is straightforward.
## Installation with cpanm
If you have cpanm, you only need one line:
% cpanm HTTP::Date
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::Date
## Manual installation
As a last resort, you can manually install it. If you have not already
downloaded the release tarball, you can find the download link on the module's
MetaCPAN page: https://metacpan.org/pod/HTTP::Date
Untar the tarball, 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-Date documentation is available as POD.
You can run `perldoc` from a shell to read the documentation:
% perldoc HTTP::Date
For more information on installing Perl modules via CPAN, please see:
https://www.cpan.org/modules/INSTALL.html
Changes 100644 001750 001751 3764 15223600650 13514 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08 Change history for HTTP-Date
6.08 2026-07-09 02:04:21Z
- [SECURITY] Reject input longer than 64 characters in parse_date()
to prevent quadratic regex backtracking (a denial of service) on
hostile date strings. Fixes CVE-2026-14741. (Olaf Alders)
6.07 2026-06-25 15:12:09Z
- Add test with Time::Zone (GH#25) (Michal Josef Špaček)
- Add test with bad Time::Zone string (GH#26) (Michal Josef Špaček)
- Add tests with negative time (GH#26) (Michal Josef Špaček)
- Replace all instances of \d with [0-9] in regular expressions to
reject non-ASCII Unicode digits, with a regression test (GH#27)
(Robert Rothenberg)
- Reject malformed ISO 8601 timezones with a doubled colon (GH#31)
(Olaf Alders)
- Document day/month/year ordering for numeric dates (GH#32) (Olaf
Alders)
6.06 2023-07-06 22:29:55Z
- Use copyright year rather than range (GH#18) (Olaf Alders)
- Replace "Test" with "Test::More" (GH#20) (James Raspass)
- Remove the executable bit from the test (GH#21) (James Raspass)
- Add support for Windows four-digit year format (GH#23) (Grant Street
Group)
6.05 2019-11-19 03:02:32Z
- Bump minimum version of Time::Local to 1.28 (GH#17) (Olaf Alders)
6.04 2019-11-14 22:22:50Z
- Replace vars with our (GH#15) (James Raspass)
- Tidy lib and t files (GH#16) (Olaf Alders)
6.03 2019-11-13 14:11:51Z
- RT123557 Fix for DST test issues (GH#14) (@pludlamCVL)
- Add Travis tests and convert to Dist::Zilla (GH#13) (Olaf Alders)
6.02 2012-03-30
- Added support for parsing dates with (faulty) double TZ spec [RT#75150]
- Doc tweaks.
6.01 2012-02-15
- Restore perl-5.6 compatiblity. Drop MacOS (classic) support.
6.00 2011-02-25
- Initial release of HTTP-Date as a separate distribution. There are no
code changes besides incrementing the version number since
libwww-perl-5.837.
The HTTP::Date module used to be bundled with the libwww-perl distribution.
cpanfile 100644 001750 001751 3323 15223600650 13714 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08 # This file is generated by Dist::Zilla::Plugin::CPANFile v6.037
# Do not edit this file directly. To change prereqs, edit the `dist.ini` file.
requires "Exporter" => "0";
requires "Time::Local" => "1.28";
requires "Time::Zone" => "0";
requires "perl" => "5.006002";
requires "strict" => "0";
on 'test' => sub {
requires "ExtUtils::MakeMaker" => "0";
requires "File::Spec" => "0";
requires "IO::Handle" => "0";
requires "IPC::Open3" => "0";
requires "Test::More" => "0.96";
requires "Time::HiRes" => "0";
requires "warnings" => "0";
};
on 'test' => sub {
recommends "CPAN::Meta" => "2.120900";
};
on 'configure' => sub {
requires "ExtUtils::MakeMaker" => "0";
};
on 'configure' => sub {
suggests "JSON::PP" => "2.27300";
};
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 "Encode" => "0";
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::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.17";
requires "Test::Vars" => "0.014";
requires "Test::Version" => "1";
requires "warnings" => "0";
};
on 'develop' => sub {
recommends "Dist::Zilla::PluginBundle::Git::VersionManager" => "0.007";
};
META.yml 100644 001750 001751 47156 15223600650 13515 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08 ---
abstract: 'HTTP::Date - date conversion routines'
author:
- 'Gisle Aas '
build_requires:
ExtUtils::MakeMaker: '0'
File::Spec: '0'
IO::Handle: '0'
IPC::Open3: '0'
Test::More: '0.96'
Time::HiRes: '0'
warnings: '0'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.037, CPAN::Meta::Converter version 2.150013'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: HTTP-Date
no_index:
directory:
- examples
- t
- xt
requires:
Exporter: '0'
Time::Local: '1.28'
Time::Zone: '0'
perl: '5.006002'
strict: '0'
resources:
IRC: irc://irc.perl.org/#lwp
MailingList: mailto:libwww@perl.org
bugtracker: https://github.com/libwww-perl/HTTP-Date/issues
homepage: https://github.com/libwww-perl/HTTP-Date
repository: https://github.com/libwww-perl/HTTP-Date.git
version: '6.08'
x_Dist_Zilla:
perl:
version: '5.042002'
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.060'
-
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.060'
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@Author::OALDERS/AutoPrereqs'
version: '6.037'
-
class: Dist::Zilla::Plugin::CheckChangesHasContent
name: '@Author::OALDERS/CheckChangesHasContent'
version: '0.011'
-
class: Dist::Zilla::Plugin::MakeMaker
config:
Dist::Zilla::Role::TestRunner:
default_jobs: '8'
name: '@Author::OALDERS/MakeMaker'
version: '6.037'
-
class: Dist::Zilla::Plugin::CPANFile
name: '@Author::OALDERS/CPANFile'
version: '6.037'
-
class: Dist::Zilla::Plugin::ContributorsFile
name: '@Author::OALDERS/ContributorsFile'
version: 0.4.0
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@Author::OALDERS/MetaJSON'
version: '6.037'
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@Author::OALDERS/MetaYAML'
version: '6.037'
-
class: Dist::Zilla::Plugin::Manifest
name: '@Author::OALDERS/Manifest'
version: '6.037'
-
class: Dist::Zilla::Plugin::MetaNoIndex
name: '@Author::OALDERS/MetaNoIndex'
version: '6.037'
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@Author::OALDERS/MetaConfig'
version: '6.037'
-
class: Dist::Zilla::Plugin::MetaResources
name: '@Author::OALDERS/MetaResources'
version: '6.037'
-
class: Dist::Zilla::Plugin::License
name: '@Author::OALDERS/License'
version: '6.037'
-
class: Dist::Zilla::Plugin::InstallGuide
config:
Dist::Zilla::Role::ModuleMetadata:
Module::Metadata: '1.000038'
version: '0.006'
name: '@Author::OALDERS/InstallGuide'
version: '1.200014'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: develop
type: requires
name: '@Author::OALDERS/Modules for use with tidyall'
version: '6.037'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@Author::OALDERS/ExecDir'
version: '6.037'
-
class: Dist::Zilla::Plugin::Test::PodSpelling
config:
Dist::Zilla::Plugin::Test::PodSpelling:
directories:
- bin
- lib
spell_cmd: ''
stopwords:
- Alders
- "Alders'"
- TZ
- YYYY
wordlist: Pod::Wordlist
name: '@Author::OALDERS/Test::PodSpelling'
version: '2.007006'
-
class: Dist::Zilla::Plugin::MojibakeTests
name: '@Author::OALDERS/MojibakeTests'
version: '0.8'
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@Author::OALDERS/PodSyntaxTests'
version: '6.037'
-
class: Dist::Zilla::Plugin::Test::CPAN::Changes
config:
Dist::Zilla::Plugin::Test::CPAN::Changes:
changelog: Changes
filename: xt/release/cpan-changes.t
name: '@Author::OALDERS/Test::CPAN::Changes'
version: '0.013'
-
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::Pod::Coverage::Configurable
name: '@Author::OALDERS/Test::Pod::Coverage::Configurable'
version: '0.07'
-
class: Dist::Zilla::Plugin::Test::Portability
config:
Dist::Zilla::Plugin::Test::Portability:
options: ''
name: '@Author::OALDERS/Test::Portability'
version: '2.001003'
-
class: Dist::Zilla::Plugin::TestRelease
name: '@Author::OALDERS/TestRelease'
version: '6.037'
-
class: Dist::Zilla::Plugin::Test::ReportPrereqs
name: '@Author::OALDERS/Test::ReportPrereqs'
version: '0.029'
-
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: '8'
name: '@Author::OALDERS/RunExtraTests'
version: '0.029'
-
class: Dist::Zilla::Plugin::PodWeaver
config:
Dist::Zilla::Plugin::PodWeaver:
finder:
- ':InstallModules'
- ':PerlExecFiles'
plugins:
-
class: Pod::Weaver::Plugin::EnsurePod5
name: '@CorePrep/EnsurePod5'
version: '4.020'
-
class: Pod::Weaver::Plugin::H1Nester
name: '@CorePrep/H1Nester'
version: '4.020'
-
class: Pod::Weaver::Plugin::SingleEncoding
name: '@Default/SingleEncoding'
version: '4.020'
-
class: Pod::Weaver::Section::Name
name: '@Default/Name'
version: '4.020'
-
class: Pod::Weaver::Section::Version
name: '@Default/Version'
version: '4.020'
-
class: Pod::Weaver::Section::Region
name: '@Default/prelude'
version: '4.020'
-
class: Pod::Weaver::Section::Generic
name: SYNOPSIS
version: '4.020'
-
class: Pod::Weaver::Section::Generic
name: DESCRIPTION
version: '4.020'
-
class: Pod::Weaver::Section::Generic
name: OVERVIEW
version: '4.020'
-
class: Pod::Weaver::Section::Collect
name: ATTRIBUTES
version: '4.020'
-
class: Pod::Weaver::Section::Collect
name: METHODS
version: '4.020'
-
class: Pod::Weaver::Section::Collect
name: FUNCTIONS
version: '4.020'
-
class: Pod::Weaver::Section::Leftovers
name: '@Default/Leftovers'
version: '4.020'
-
class: Pod::Weaver::Section::Region
name: '@Default/postlude'
version: '4.020'
-
class: Pod::Weaver::Section::Authors
name: '@Default/Authors'
version: '4.020'
-
class: Pod::Weaver::Section::Legal
name: '@Default/Legal'
version: '4.020'
name: '@Author::OALDERS/PodWeaver'
version: '4.010'
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@Author::OALDERS/PruneCruft'
version: '6.037'
-
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: []
include_dotfiles: 0
prefix: ''
prune_directory: []
root: .
Dist::Zilla::Plugin::Git::GatherDir:
include_untracked: 0
name: '@Author::OALDERS/Git::GatherDir'
version: '2.052'
-
class: Dist::Zilla::Plugin::CopyFilesFromRelease
config:
Dist::Zilla::Plugin::CopyFilesFromRelease:
filename:
- Install
match: []
name: '@Author::OALDERS/CopyFilesFromRelease'
version: '0.007'
-
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.43.0
repo_root: .
name: '@Author::OALDERS/Git::Check'
version: '2.052'
-
class: Dist::Zilla::Plugin::Git::Contributors
config:
Dist::Zilla::Plugin::Git::Contributors:
git_version: 2.43.0
include_authors: 0
include_releaser: 1
order_by: name
paths: []
name: '@Author::OALDERS/Git::Contributors'
version: '0.039'
-
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.037'
-
class: Dist::Zilla::Plugin::CheckIssues
name: '@Author::OALDERS/CheckIssues'
version: '0.011'
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@Author::OALDERS/ConfirmRelease'
version: '6.037'
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@Author::OALDERS/UploadToCPAN'
version: '6.037'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: develop
type: recommends
name: '@Author::OALDERS/@Git::VersionManager/pluginbundle version'
version: '6.037'
-
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.007'
-
class: Dist::Zilla::Plugin::Git::Commit
config:
Dist::Zilla::Plugin::Git::Commit:
add_files_in: []
commit_msg: v%V%n%n%c
signoff: 0
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.43.0
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: '@Author::OALDERS/@Git::VersionManager/release snapshot'
version: '2.052'
-
class: Dist::Zilla::Plugin::Git::Tag
config:
Dist::Zilla::Plugin::Git::Tag:
branch: ~
changelog: Changes
signed: 0
tag: v6.08
tag_format: v%V
tag_message: v%V
Dist::Zilla::Role::Git::Repo:
git_version: 2.43.0
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: '@Author::OALDERS/@Git::VersionManager/Git::Tag'
version: '2.052'
-
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.037'
-
class: Dist::Zilla::Plugin::Git::Commit
config:
Dist::Zilla::Plugin::Git::Commit:
add_files_in: []
commit_msg: 'increment $VERSION after %v release'
signoff: 0
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.43.0
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: '@Author::OALDERS/@Git::VersionManager/post-release commit'
version: '2.052'
-
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.43.0
repo_root: .
name: '@Author::OALDERS/Git::Push'
version: '2.052'
-
class: Dist::Zilla::Plugin::MetaResources
name: MetaResources
version: '6.037'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: runtime
type: requires
name: Prereqs
version: '6.037'
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: test
type: requires
name: TestRequires
version: '6.037'
-
class: Dist::Zilla::Plugin::Test::ChangesHasContent
name: Test::ChangesHasContent
version: '0.011'
-
class: Dist::Zilla::Plugin::Substitute
name: changes_has_content.t
version: '0.008'
-
class: Dist::Zilla::Plugin::Test::Compile
config:
Dist::Zilla::Plugin::Test::Compile:
bail_out_on_fail: 0
fail_on_warning: author
fake_home: 0
filename: t/00-compile.t
module_finder:
- ':InstallModules'
needs_display: 0
phase: test
script_finder:
- ':PerlExecFiles'
skips: []
switch: []
name: Test::Compile
version: '2.059'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExtraTestFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':PerlExecFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':AllFiles'
version: '6.037'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':NoFiles'
version: '6.037'
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
version: '6.037'
x_contributors:
- 'Adam Kennedy '
- 'Adam Sjogren '
- 'Alexey Tourbin '
- 'Alex Kapranoff '
- 'amire80 '
- 'Andreas J. Koenig '
- 'Bill Mann '
- 'Bron Gondwana '
- 'Daniel Hedlund '
- 'David E. Wheeler '
- 'DAVIDRW '
- 'dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>'
- 'Father Chrysostomos '
- 'FWILES '
- 'Gavin Peters '
- 'Gisle Aas '
- 'Graeme Thompson '
- 'Hans-H. Froehlich '
- 'Ian Kilgore '
- 'Jacob J '
- 'James Raspass '
- 'jefflee '
- 'john9art '
- 'Kyle Wright '
- 'Mark Stosberg '
- 'Michal Josef Špaček '
- 'Mike Schilli '
- 'mschilli '
- 'murphy '
- 'Olaf Alders '
- 'Ondrej Hanak '
- 'Peter Rabbitson '
- 'Philip J. Ludlam '
- 'phrstbrn '
- 'pnull '
- 'Robert Rothenberg '
- 'Robert Stone '
- 'Rolf Grossmann '
- 'ruff '
- 'sasao '
- 'Sean M. Burke '
- 'Slaven Rezic '
- 'Spiros Denaxas '
- 'Steve Hay '
- 'Todd Lipcon '
- 'Tom Hukins '
- 'Tony Finch '
- 'Toru Yamaguchi '
- 'uid39246 '
- 'Ville Skyttä '
- 'Yuri Karaban '
- 'Zefram '
x_generated_by_perl: v5.42.2
x_serialization_backend: 'YAML::Tiny version 1.76'
x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
x_static_install: 1
MANIFEST 100644 001750 001751 1076 15223600650 13344 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.037
CONTRIBUTORS
Changes
INSTALL
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README.md
cpanfile
dist.ini
lib/HTTP/Date.pm
perlcriticrc
perltidyrc
t/00-compile.t
t/00-report-prereqs.dd
t/00-report-prereqs.t
t/date.t
t/numeric-date-order.t
t/redos.t
t/unicode-digits.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/test-version.t
xt/release/changes_has_content.t
xt/release/cpan-changes.t
dist.ini 100644 001750 001751 2373 15223600650 13660 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08 name = HTTP-Date
author = Gisle Aas
license = Perl_5
main_module = lib/HTTP/Date.pm
copyright_holder = Gisle Aas
copyright_year = 1995
[@Author::OALDERS]
StaticInstall.mode = on
StaticInstall.dry_run = 0
-remove = MinimumPerl
-remove = Test::Perl::Critic
-remove = Test::Synopsis
-remove = Test::TidyAll
[MetaResources]
x_IRC = irc://irc.perl.org/#lwp
x_MailingList = mailto:libwww@perl.org
[Prereqs]
perl = 5.006002
Time::Local = 1.28
; t/redos.t uses subtest(), which needs a Test::More newer than the one
; bundled with older perls (e.g. 5.10/5.12 ship < 0.96).
[Prereqs / TestRequires]
Test::More = 0.96
; We run release tests in travis. but make the changes-has-content test TODO only for master.
; This will prod pull request submitters to add a Changes entry.
[Test::ChangesHasContent]
[Substitute / changes_has_content.t]
file = xt/release/changes_has_content.t
code = s{^(note 'Checking Changes')}{if \(\(\$ENV\{TRAVIS_PULL_REQUEST\} \|\| '') eq 'false'\) \{\n chomp\(my \$branch_name = \(\$ENV\{TRAVIS_BRANCH\} || \`git rev-parse --abbrev-ref HEAD\`\)\);\n \$TODO = 'Changes need not have content for this release yet if this is only the master branch'\n if \(\$branch_name \|\| ''\) eq 'master';\n\}\n\n$1}
[Test::Compile]
t 000755 001750 001751 0 15223600650 12312 5 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08 date.t 100644 001750 001751 14171 15223600650 13600 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/t #!perl
use strict;
use warnings;
use Test::More tests => 156;
use HTTP::Date;
# test str2time for supported dates. Test cases with 2 digit year
# will probably break in year 2044.
my (@tests) = (
'Thu Feb 3 00:00:00 GMT 1994', # ctime format
'Thu Feb 3 00:00:00 1994', # same as ctime, except no TZ
'Thu, 03 Feb 1994 00:00:00 GMT', # proposed new HTTP format
'Thursday, 03-Feb-94 00:00:00 GMT', # old rfc850 HTTP format
'Thursday, 03-Feb-1994 00:00:00 GMT', # broken rfc850 HTTP format
'03/Feb/1994:00:00:00 0000', # common logfile format
'03/Feb/1994:01:00:00 +0100', # common logfile format
'02/Feb/1994:23:00:00 -0100', # common logfile format
'03 Feb 1994 00:00:00 GMT', # HTTP format (no weekday)
'03-Feb-94 00:00:00 GMT', # old rfc850 (no weekday)
'03-Feb-1994 00:00:00 GMT', # broken rfc850 (no weekday)
'03-Feb-1994 00:00 GMT', # broken rfc850 (no weekday, no seconds)
'03-Feb-1994 00:00', # VMS dir listing format
'03-Feb-94', # old rfc850 HTTP format (no weekday, no time)
'03-Feb-1994', # broken rfc850 HTTP format (no weekday, no time)
'03 Feb 1994', # proposed new HTTP format (no weekday, no time)
'03/Feb/1994', # common logfile format (no time, no offset)
#'Feb 3 00:00', # Unix 'ls -l' format (can't really test it here)
'Feb 3 1994', # Unix 'ls -l' format
"02-03-94 12:00AM", # Windows 'dir' format
"02-03-1994 12:00AM", # Windows 'dir' format with four-digit year
# ISO 8601 formats
'1994-02-03 00:00:00 +0000',
'1994-02-03',
'19940203',
'1994-02-03T00:00:00+0000',
'1994-02-02T23:00:00-0100',
'1994-02-02T23:00:00-01:00',
'1994-02-03T00:00:00 Z',
'19940203T000000Z',
'199402030000',
# A few tests with extra space at various places
' 03/Feb/1994 ',
' 03 Feb 1994 0:00 ',
# Tests a commonly used (faulty?) date format of php cms systems
'Thu, 03 Feb 1994 00:00:00 +0000 GMT',
# Test with Time::Zone
'03 Feb 1994 02:00:00 CEST',
);
my $time = 760233600; # assume broken POSIX counting of seconds
for (@tests) {
my $t;
if (/GMT/i) {
$t = str2time($_);
}
else {
$t = str2time( $_, "GMT" );
}
my $t2 = str2time( lc($_), "GMT" );
my $t3 = str2time( uc($_), "GMT" );
note "\n'$_'";
is( $t, $time );
is( $t2, $time );
is( $t3, $time );
}
# test time2str
is( time2str($time), 'Thu, 03 Feb 1994 00:00:00 GMT' );
# test the 'ls -l' format with missing year$
# round to nearest minute 3 days ago.
my $passed = 0;
# Put in a hack to make the test pass due to daylight savings time affecting
# the result
for my $day ( 3 .. 4 ) {
$time = int( ( time - $day * 24 * 60 * 60 ) / 60 ) * 60;
my ( $min, $hr, $mday, $mon ) = ( localtime $time )[ 1, 2, 3, 4 ];
$mon = (qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec))[$mon];
my $str = sprintf( "$mon %02d %02d:%02d", $mday, $hr, $min );
my $t = str2time($str);
if ( $t == $time ) {
$passed = 1;
last;
}
}
ok($passed);
# try some garbage.
for (
undef, '', 'Garbage',
'Mandag 16. September 1996',
'12 Arp 2003',
# 'Thu Feb 3 00:00:00 CET 1994',
# 'Thu, 03 Feb 1994 00:00:00 CET',
# 'Wednesday, 31-Dec-69 23:59:59 GMT',
'1980-00-01',
'1980-13-01',
'1980-01-00',
'1980-01-32',
'1980-01-01 25:00:00',
'1980-01-01 00:61:00',
'1980-01-01 00:00:61',
# Negative time
'1880-01-01',
'Thu, 01 Jan 1880 00:00:00 GMT',
'01/Jan/1880:00:00:00 0000',
# Bad timezone string
'01 Jan 1994 02:00:00 BAD',
) {
my $bad = 0;
eval {
if ( defined str2time $_) {
print "str2time($_) is not undefined\n";
$bad++;
}
};
note defined($_) ? "\n'$_'" : "undef";
ok( !$@ );
ok( !$bad );
}
note "Testing AM/PM gruff...";
# Test the str2iso routines
use HTTP::Date qw(time2iso time2isoz);
note "Testing time2iso functions";
my $t = time2iso( str2time("11-12-96 0:00AM") );
is( $t, "1996-11-12 00:00:00" );
$t = time2iso( str2time("11-12-96 12:00AM") );
is( $t, "1996-11-12 00:00:00" );
$t = time2iso( str2time("11-12-96 0:00PM") );
is( $t, "1996-11-12 12:00:00" );
$t = time2iso( str2time("11-12-96 12:00PM") );
is( $t, "1996-11-12 12:00:00" );
$t = time2iso( str2time("11-12-96 1:05AM") );
is( $t, "1996-11-12 01:05:00" );
$t = time2iso( str2time("11-12-96 12:05AM") );
is( $t, "1996-11-12 00:05:00" );
$t = time2iso( str2time("11-12-96 1:05PM") );
is( $t, "1996-11-12 13:05:00" );
$t = time2iso( str2time("11-12-96 12:05PM") );
is( $t, "1996-11-12 12:05:00" );
$t = time2iso( str2time("11-12-01 12:00PM") );
is( $t, "2001-11-12 12:00:00" );
$t = time2iso( str2time("11-12-1996 12:00AM") );
is( $t, "1996-11-12 00:00:00" );
$t = time2iso( str2time("11-12-2022 12:00AM") );
is( $t, "2022-11-12 00:00:00" );
$t = str2time("2000-01-01 00:00:01.234");
note "FRAC $t = ", time2iso($t);
cmp_ok( abs( ( $t - int($t) ) - 0.234 ), '<', 0.000001 );
$a = time2iso;
$b = time2iso(500000);
note "LOCAL $a $b";
my $az = time2isoz;
my $bz = time2isoz(500000);
note "GMT $az $bz";
for ( $a, $b ) { like($_, qr/^\d{4}-\d\d-\d\d \d\d:\d\d:\d\d$/); }
for ( $az, $bz ) { like($_, qr/^\d{4}-\d\d-\d\d \d\d:\d\d:\d\dZ$/); }
# Test the parse_date interface
use HTTP::Date qw(parse_date);
my @d = parse_date("Jan 1 2001");
is_deeply( \@d, [2001, 1, 1, 0, 0, 0, undef] );
# A malformed timezone with a doubled colon must be rejected, not silently
# captured as the timezone. RT #101378 / GH #7.
is_deeply( [ parse_date("1996-02-29 12:00:00 -01::00") ],
[], 'malformed timezone -01::00 is rejected' );
# Well-formed timezone variants must still parse, returning the timezone intact.
for my $tz ('-01:00', '-0100', '-01') {
my @d = parse_date("1996-02-29 12:00:00 $tz");
is( $d[6], $tz, "timezone $tz still accepted" );
}
# This test will break around year 2070
is( parse_date("03-Feb-20"), "2020-02-03 00:00:00" );
# This test will break around year 2048
is( parse_date("03-Feb-98"), "1998-02-03 00:00:00" );
note "HTTP::Date $HTTP::Date::VERSION";
META.json 100644 001750 001751 74345 15223600650 13665 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08 {
"abstract" : "HTTP::Date - date conversion routines",
"author" : [
"Gisle Aas "
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 6.037, CPAN::Meta::Converter version 2.150013",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : 2
},
"name" : "HTTP-Date",
"no_index" : {
"directory" : [
"examples",
"t",
"xt"
]
},
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
},
"suggests" : {
"JSON::PP" : "2.27300"
}
},
"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",
"Encode" : "0",
"Parallel::ForkManager" : "1.19",
"Perl::Critic" : "1.132",
"Perl::Tidy" : "20180220",
"Pod::Coverage::TrustPod" : "0",
"Pod::Wordlist" : "0",
"Test::CPAN::Changes" : "0.19",
"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.17",
"Test::Vars" : "0.014",
"Test::Version" : "1",
"warnings" : "0"
}
},
"runtime" : {
"requires" : {
"Exporter" : "0",
"Time::Local" : "1.28",
"Time::Zone" : "0",
"perl" : "5.006002",
"strict" : "0"
}
},
"test" : {
"recommends" : {
"CPAN::Meta" : "2.120900"
},
"requires" : {
"ExtUtils::MakeMaker" : "0",
"File::Spec" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
"Test::More" : "0.96",
"Time::HiRes" : "0",
"warnings" : "0"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/libwww-perl/HTTP-Date/issues"
},
"homepage" : "https://github.com/libwww-perl/HTTP-Date",
"repository" : {
"type" : "git",
"url" : "https://github.com/libwww-perl/HTTP-Date.git",
"web" : "https://github.com/libwww-perl/HTTP-Date"
},
"x_IRC" : "irc://irc.perl.org/#lwp",
"x_MailingList" : "mailto:libwww@perl.org"
},
"version" : "6.08",
"x_Dist_Zilla" : {
"perl" : {
"version" : "5.042002"
},
"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.060"
},
{
"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.060"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@Author::OALDERS/AutoPrereqs",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::CheckChangesHasContent",
"name" : "@Author::OALDERS/CheckChangesHasContent",
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"config" : {
"Dist::Zilla::Role::TestRunner" : {
"default_jobs" : "8"
}
},
"name" : "@Author::OALDERS/MakeMaker",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::CPANFile",
"name" : "@Author::OALDERS/CPANFile",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::ContributorsFile",
"name" : "@Author::OALDERS/ContributorsFile",
"version" : "0.4.0"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@Author::OALDERS/MetaJSON",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@Author::OALDERS/MetaYAML",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@Author::OALDERS/Manifest",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::MetaNoIndex",
"name" : "@Author::OALDERS/MetaNoIndex",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@Author::OALDERS/MetaConfig",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::MetaResources",
"name" : "@Author::OALDERS/MetaResources",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@Author::OALDERS/License",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::InstallGuide",
"config" : {
"Dist::Zilla::Role::ModuleMetadata" : {
"Module::Metadata" : "1.000038",
"version" : "0.006"
}
},
"name" : "@Author::OALDERS/InstallGuide",
"version" : "1.200014"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "develop",
"type" : "requires"
}
},
"name" : "@Author::OALDERS/Modules for use with tidyall",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@Author::OALDERS/ExecDir",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Test::PodSpelling",
"config" : {
"Dist::Zilla::Plugin::Test::PodSpelling" : {
"directories" : [
"bin",
"lib"
],
"spell_cmd" : "",
"stopwords" : [
"Alders",
"Alders'",
"TZ",
"YYYY"
],
"wordlist" : "Pod::Wordlist"
}
},
"name" : "@Author::OALDERS/Test::PodSpelling",
"version" : "2.007006"
},
{
"class" : "Dist::Zilla::Plugin::MojibakeTests",
"name" : "@Author::OALDERS/MojibakeTests",
"version" : "0.8"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@Author::OALDERS/PodSyntaxTests",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Test::CPAN::Changes",
"config" : {
"Dist::Zilla::Plugin::Test::CPAN::Changes" : {
"changelog" : "Changes",
"filename" : "xt/release/cpan-changes.t"
}
},
"name" : "@Author::OALDERS/Test::CPAN::Changes",
"version" : "0.013"
},
{
"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::Pod::Coverage::Configurable",
"name" : "@Author::OALDERS/Test::Pod::Coverage::Configurable",
"version" : "0.07"
},
{
"class" : "Dist::Zilla::Plugin::Test::Portability",
"config" : {
"Dist::Zilla::Plugin::Test::Portability" : {
"options" : ""
}
},
"name" : "@Author::OALDERS/Test::Portability",
"version" : "2.001003"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@Author::OALDERS/TestRelease",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Test::ReportPrereqs",
"name" : "@Author::OALDERS/Test::ReportPrereqs",
"version" : "0.029"
},
{
"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" : "8"
}
},
"name" : "@Author::OALDERS/RunExtraTests",
"version" : "0.029"
},
{
"class" : "Dist::Zilla::Plugin::PodWeaver",
"config" : {
"Dist::Zilla::Plugin::PodWeaver" : {
"finder" : [
":InstallModules",
":PerlExecFiles"
],
"plugins" : [
{
"class" : "Pod::Weaver::Plugin::EnsurePod5",
"name" : "@CorePrep/EnsurePod5",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Plugin::H1Nester",
"name" : "@CorePrep/H1Nester",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Plugin::SingleEncoding",
"name" : "@Default/SingleEncoding",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Name",
"name" : "@Default/Name",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Version",
"name" : "@Default/Version",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@Default/prelude",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "SYNOPSIS",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "DESCRIPTION",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "OVERVIEW",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "ATTRIBUTES",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "METHODS",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "FUNCTIONS",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Leftovers",
"name" : "@Default/Leftovers",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@Default/postlude",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Authors",
"name" : "@Default/Authors",
"version" : "4.020"
},
{
"class" : "Pod::Weaver::Section::Legal",
"name" : "@Default/Legal",
"version" : "4.020"
}
]
}
},
"name" : "@Author::OALDERS/PodWeaver",
"version" : "4.010"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@Author::OALDERS/PruneCruft",
"version" : "6.037"
},
{
"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" : [],
"include_dotfiles" : 0,
"prefix" : "",
"prune_directory" : [],
"root" : "."
},
"Dist::Zilla::Plugin::Git::GatherDir" : {
"include_untracked" : 0
}
},
"name" : "@Author::OALDERS/Git::GatherDir",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::CopyFilesFromRelease",
"config" : {
"Dist::Zilla::Plugin::CopyFilesFromRelease" : {
"filename" : [
"Install"
],
"match" : []
}
},
"name" : "@Author::OALDERS/CopyFilesFromRelease",
"version" : "0.007"
},
{
"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.43.0",
"repo_root" : "."
}
},
"name" : "@Author::OALDERS/Git::Check",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::Git::Contributors",
"config" : {
"Dist::Zilla::Plugin::Git::Contributors" : {
"git_version" : "2.43.0",
"include_authors" : 0,
"include_releaser" : 1,
"order_by" : "name",
"paths" : []
}
},
"name" : "@Author::OALDERS/Git::Contributors",
"version" : "0.039"
},
{
"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.037"
},
{
"class" : "Dist::Zilla::Plugin::CheckIssues",
"name" : "@Author::OALDERS/CheckIssues",
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@Author::OALDERS/ConfirmRelease",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@Author::OALDERS/UploadToCPAN",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "develop",
"type" : "recommends"
}
},
"name" : "@Author::OALDERS/@Git::VersionManager/pluginbundle version",
"version" : "6.037"
},
{
"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.007"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
"config" : {
"Dist::Zilla::Plugin::Git::Commit" : {
"add_files_in" : [],
"commit_msg" : "v%V%n%n%c",
"signoff" : 0
},
"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.43.0",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "@Author::OALDERS/@Git::VersionManager/release snapshot",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
"config" : {
"Dist::Zilla::Plugin::Git::Tag" : {
"branch" : null,
"changelog" : "Changes",
"signed" : 0,
"tag" : "v6.08",
"tag_format" : "v%V",
"tag_message" : "v%V"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.43.0",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "@Author::OALDERS/@Git::VersionManager/Git::Tag",
"version" : "2.052"
},
{
"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.037"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
"config" : {
"Dist::Zilla::Plugin::Git::Commit" : {
"add_files_in" : [],
"commit_msg" : "increment $VERSION after %v release",
"signoff" : 0
},
"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.43.0",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "@Author::OALDERS/@Git::VersionManager/post-release commit",
"version" : "2.052"
},
{
"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.43.0",
"repo_root" : "."
}
},
"name" : "@Author::OALDERS/Git::Push",
"version" : "2.052"
},
{
"class" : "Dist::Zilla::Plugin::MetaResources",
"name" : "MetaResources",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "runtime",
"type" : "requires"
}
},
"name" : "Prereqs",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "test",
"type" : "requires"
}
},
"name" : "TestRequires",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::Test::ChangesHasContent",
"name" : "Test::ChangesHasContent",
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::Substitute",
"name" : "changes_has_content.t",
"version" : "0.008"
},
{
"class" : "Dist::Zilla::Plugin::Test::Compile",
"config" : {
"Dist::Zilla::Plugin::Test::Compile" : {
"bail_out_on_fail" : 0,
"fail_on_warning" : "author",
"fake_home" : 0,
"filename" : "t/00-compile.t",
"module_finder" : [
":InstallModules"
],
"needs_display" : 0,
"phase" : "test",
"script_finder" : [
":PerlExecFiles"
],
"skips" : [],
"switch" : []
}
},
"name" : "Test::Compile",
"version" : "2.059"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExtraTestFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":PerlExecFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":AllFiles",
"version" : "6.037"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":NoFiles",
"version" : "6.037"
}
],
"zilla" : {
"class" : "Dist::Zilla::Dist::Builder",
"config" : {
"is_trial" : 0
},
"version" : "6.037"
}
},
"x_contributors" : [
"Adam Kennedy ",
"Adam Sjogren ",
"Alexey Tourbin ",
"Alex Kapranoff ",
"amire80 ",
"Andreas J. Koenig ",
"Bill Mann ",
"Bron Gondwana ",
"Daniel Hedlund ",
"David E. Wheeler ",
"DAVIDRW ",
"dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>",
"Father Chrysostomos ",
"FWILES ",
"Gavin Peters ",
"Gisle Aas ",
"Graeme Thompson ",
"Hans-H. Froehlich ",
"Ian Kilgore ",
"Jacob J ",
"James Raspass ",
"jefflee ",
"john9art ",
"Kyle Wright ",
"Mark Stosberg ",
"Michal Josef \u0160pa\u010dek ",
"Mike Schilli ",
"mschilli ",
"murphy ",
"Olaf Alders ",
"Ondrej Hanak ",
"Peter Rabbitson ",
"Philip J. Ludlam ",
"phrstbrn ",
"pnull ",
"Robert Rothenberg ",
"Robert Stone ",
"Rolf Grossmann ",
"ruff ",
"sasao ",
"Sean M. Burke ",
"Slaven Rezic ",
"Spiros Denaxas ",
"Steve Hay ",
"Todd Lipcon ",
"Tom Hukins ",
"Tony Finch ",
"Toru Yamaguchi ",
"uid39246 ",
"Ville Skytt\u00e4 ",
"Yuri Karaban ",
"Zefram "
],
"x_generated_by_perl" : "v5.42.2",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.40",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
"x_static_install" : 1
}
redos.t 100644 001750 001751 6216 15223600650 13760 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/t #!perl
use strict;
use warnings;
use Test::More;
use Time::HiRes qw(time);
use HTTP::Date qw(str2time parse_date);
# Regression test: parse_date must not exhibit catastrophic (quadratic)
# backtracking on hostile input. A valid-looking date prefix followed by a
# long interior run of digits, letters, or whitespace and a trailing junk
# character used to force the parsing regex to explore O(N^2) states, so a
# ~40 KB string burned tens of seconds of CPU -- a denial of service.
# parse_date now rejects input longer than the cap below, up front, so such
# strings are handled instantly.
# The length cap parse_date enforces. It is hardcoded in HTTP::Date (a
# security limit, not a knob), so mirror the value here; keep the two in sync.
my $LIMIT = 64;
subtest 'length guard rejects over-long input' => sub {
my $good = 'Wed, 09 Feb 1994 22:23:32 GMT';
ok( defined parse_date($good), 'a normal date parses' );
# Padding a date that parses fine on its own pushes it past the limit and
# it is rejected -- a deterministic proof the guard fires, no timing needed.
my $padded = $good . ( q{ } x $LIMIT );
cmp_ok(
length $padded, '>', $LIMIT,
'padded string exceeds the length limit'
);
is( parse_date($padded), undef, 'parse_date rejects over-length input' );
is( str2time($padded), undef, 'str2time rejects over-length input too' );
};
subtest 'length guard boundary is exactly the cap' => sub {
# The check is "> $LIMIT", so a string of exactly the limit is still
# considered and one character longer is rejected. Guards against a future
# off-by-one turning the cap into >= (which would reject a legal boundary).
my $limit = $LIMIT;
my $at_limit = 'Wed, 09 Feb 1994 22:23:32 GMT';
$at_limit .= q{ } x ( $limit - length $at_limit ); # pad up to the limit
is( length $at_limit, $limit, "test string is exactly $limit bytes" );
ok( defined parse_date($at_limit), 'input at the limit is still parsed' );
my $over_limit = $at_limit . q{ }; # one byte too long
is( length $over_limit, $limit + 1, "test string is $limit + 1 bytes" );
is( parse_date($over_limit), undef, 'input past the limit is rejected' );
};
subtest 'hostile input is rejected promptly' => sub {
# Unguarded these scale as O(N^2) and take many seconds; guarded they
# return immediately. The 1-second threshold is deliberately generous so
# the test is not flaky on a loaded machine. Each case targets a distinct
# ambiguous seam in the parsing regex.
my %evil = (
'letter run' => '01 Jan 2000 ' . ( 'a' x 10000 ) . '!',
'digit run' => '01 Jan ' . ( '1' x 10000 ) . '!',
'space run' => '01 Jan 2000' . ( ' ' x 10000 ) . '!',
);
for my $branch ( sort keys %evil ) {
my $str = $evil{$branch};
my $t0 = time;
my $got = parse_date($str);
my $elapsed = time - $t0;
is( $got, undef, "hostile input ($branch) is rejected" );
cmp_ok(
$elapsed, '<', 1,
sprintf '%s: %d-byte input handled promptly (%.3fs)',
$branch, length $str, $elapsed
);
}
};
done_testing;
README.md 100644 001750 001751 13271 15223600650 13512 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08 # NAME
HTTP::Date - HTTP::Date - date conversion routines
# VERSION
version 6.08
# SYNOPSIS
use HTTP::Date;
$string = time2str($time); # Format as GMT ASCII time
$time = str2time($string); # convert ASCII date to machine time
# DESCRIPTION
This module provides functions that deal the date formats used by the
HTTP protocol (and then some more). Only the first two functions,
time2str() and str2time(), are exported by default.
- time2str( \[$time\] )
The time2str() function converts a machine time (seconds since epoch)
to a string. If the function is called without an argument or with an
undefined argument, it will use the current time.
The string returned is in the format preferred for the HTTP protocol.
This is a fixed length subset of the format defined by RFC 1123,
represented in Universal Time (GMT). An example of a time stamp
in this format is:
Sun, 06 Nov 1994 08:49:37 GMT
- str2time( $str \[, $zone\] )
The str2time() function converts a string to machine time. It returns
`undef` if the format of $str is unrecognized, otherwise whatever the
`Time::Local` functions can make out of the parsed time. Dates
before the system's epoch may not work on all operating systems. The
time formats recognized are the same as for parse\_date().
The function also takes an optional second argument that specifies the
default time zone to use when converting the date. This parameter is
ignored if the zone is found in the date string itself. If this
parameter is missing, and the date string format does not contain any
zone specification, then the local time zone is assumed.
If the zone is not "`GMT`" or numerical (like "`-0800`" or
"`+0100`"), then the `Time::Zone` module must be installed in order
to get the date recognized.
- parse\_date( $str )
This function will try to parse a date string, and then return it as a
list of numerical values followed by a (possible undefined) time zone
specifier; ($year, $month, $day, $hour, $min, $sec, $tz). The $year
will be the full 4-digit year, and $month numbers start with 1 (for January).
In scalar context the numbers are interpolated in a string of the
"YYYY-MM-DD hh:mm:ss TZ"-format and returned.
If the date is unrecognized, then the empty list is returned (`undef` in
scalar context).
As a safeguard against pathological input, strings longer than 64
characters are rejected without being parsed. The length is measured on the
string as given, before any leading or trailing whitespace is trimmed, so
heavily padded input may be rejected even if its trimmed payload would fit.
Every date format this module recognizes is far shorter than this limit.
The function is able to parse the following formats:
"Wed, 09 Feb 1994 22:23:32 GMT" -- HTTP format
"Thu Feb 3 17:03:55 GMT 1994" -- ctime(3) format
"Thu Feb 3 00:00:00 1994", -- ANSI C asctime() format
"Tuesday, 08-Feb-94 14:15:29 GMT" -- old rfc850 HTTP format
"Tuesday, 08-Feb-1994 14:15:29 GMT" -- broken rfc850 HTTP format
"03/Feb/1994:17:03:55 -0700" -- common logfile format
"09 Feb 1994 22:23:32 GMT" -- HTTP format (no weekday)
"08-Feb-94 14:15:29 GMT" -- rfc850 format (no weekday)
"08-Feb-1994 14:15:29 GMT" -- broken rfc850 format (no weekday)
"1994-02-03 14:15:29 -0100" -- ISO 8601 format
"1994-02-03 14:15:29" -- zone is optional
"1994-02-03" -- only date
"1994-02-03T14:15:29" -- Use T as separator
"19940203T141529Z" -- ISO 8601 compact format
"19940203" -- only date
"08-Feb-94" -- old rfc850 HTTP format (no weekday, no time)
"08-Feb-1994" -- broken rfc850 HTTP format (no weekday, no time)
"09 Feb 1994" -- proposed new HTTP format (no weekday, no time)
"03/Feb/1994" -- common logfile format (no time, no offset)
"Feb 3 1994" -- Unix 'ls -l' format
"Feb 3 17:03" -- Unix 'ls -l' format
"11-15-96 03:52PM" -- Windows 'dir' format
"11-15-1996 03:52PM" -- Windows 'dir' format with four-digit year
The parser ignores leading and trailing whitespace. It also allow the
seconds to be missing and the month to be numerical in most formats.
Numeric-only dates use day/month/year ordering (the ISO and common
European convention), not the US month/day/year ordering. So
"3/4/2014" is parsed as 4 March 2014, and a US-style date such as
"3/13/2014" returns undef because 13 is not a valid month. To parse
US-style dates, swap the first two fields before calling parse\_date().
If the year is missing, then we assume that the date is the first
matching date _before_ current month. If the year is given with only
2 digits, then parse\_date() will select the century that makes the
year closest to the current date.
- time2iso( \[$time\] )
Same as time2str(), but returns a "YYYY-MM-DD hh:mm:ss"-formatted
string representing time in the local time zone.
- time2isoz( \[$time\] )
Same as time2str(), but returns a "YYYY-MM-DD hh:mm:ssZ"-formatted
string representing Universal Time.
# SEE ALSO
["time" in perlfunc](https://metacpan.org/pod/perlfunc#time), [Time::Zone](https://metacpan.org/pod/Time%3A%3AZone)
# AUTHOR
Gisle Aas
# COPYRIGHT AND LICENSE
This software is copyright (c) 1995 by Gisle Aas.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
perltidyrc 100644 001750 001751 330 15223600650 14267 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08 --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="
Makefile.PL 100644 001750 001751 2664 15223600650 14171 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.037
use strict;
use warnings;
use 5.006002;
use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
"ABSTRACT" => "HTTP::Date - date conversion routines",
"AUTHOR" => "Gisle Aas ",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "HTTP-Date",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.006002",
"NAME" => "HTTP::Date",
"PREREQ_PM" => {
"Exporter" => 0,
"Time::Local" => "1.28",
"Time::Zone" => 0,
"strict" => 0
},
"TEST_REQUIRES" => {
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Test::More" => "0.96",
"Time::HiRes" => 0,
"warnings" => 0
},
"VERSION" => "6.08",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Exporter" => 0,
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Test::More" => "0.96",
"Time::HiRes" => 0,
"Time::Local" => "1.28",
"Time::Zone" => 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);
tidyall.ini 100644 001750 001751 347 15223600650 14336 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08 [PerlTidy]
select = **/*.{pl,pm,t,psgi}
ignore = .build/**/*
ignore = HTTP-Date-*/**/*
ignore = blib/**/*
ignore = t/00-*
ignore = t/author-*
ignore = t/release-*
ignore = t/zzz-*
ignore = xt/**/*
argv = --profile=$ROOT/perltidyrc
CONTRIBUTORS 100644 001750 001751 2273 15223600650 14073 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08
# HTTP-DATE 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.
* Adam Kennedy
* Adam Sjogren
* Alexey Tourbin
* Alex Kapranoff
* amire80
* Andreas J. Koenig
* Bill Mann
* Bron Gondwana
* Daniel Hedlund
* David E. Wheeler
* DAVIDRW
* dependabot[bot]
* Father Chrysostomos
* FWILES
* Gavin Peters
* Gisle Aas
* Graeme Thompson
* Hans-H. Froehlich
* Ian Kilgore
* Jacob J
* James Raspass
* jefflee
* john9art
* Kyle Wright
* Mark Stosberg
* Michal Josef Špaček
* Mike Schilli
* mschilli
* murphy
* Olaf Alders
* Ondrej Hanak
* Peter Rabbitson
* Philip J. Ludlam
* phrstbrn
* pnull
* Robert Rothenberg
* Robert Stone
* Rolf Grossmann
* ruff
* sasao
* Sean M. Burke
* Slaven Rezic
* Spiros Denaxas
* Steve Hay
* Todd Lipcon
* Tom Hukins
* Tony Finch
* Toru Yamaguchi
* uid39246
* Ville Skyttä
* Yuri Karaban
* Zefram
perlcriticrc 100644 001750 001751 4405 15223600650 14622 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08 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]
00-compile.t 100644 001750 001751 2607 15223600650 14511 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/t use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.059
use Test::More;
plan tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
my @module_files = (
'HTTP/Date.pm'
);
# no fake home requested
my @switches = (
-d 'blib' ? '-Mblib' : '-Ilib',
);
use File::Spec;
use IPC::Open3;
use IO::Handle;
open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
my @warnings;
for my $lib (@module_files)
{
# see L
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'}.$str.q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { +require blib; blib->VERSION('1.01') };
if (@_warnings)
{
warn @_warnings;
push @warnings, @_warnings;
}
}
is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING};
author 000755 001750 001751 0 15223600650 14004 5 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/xt eol.t 100644 001750 001751 643 15223600650 15073 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/xt/author 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/Date.pm',
't/00-compile.t',
't/00-report-prereqs.dd',
't/00-report-prereqs.t',
't/date.t',
't/numeric-date-order.t',
't/redos.t',
't/unicode-digits.t'
);
eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files;
done_testing;
HTTP 000755 001750 001751 0 15223600650 13374 5 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/lib Date.pm 100644 001750 001751 32111 15223600650 14765 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/lib/HTTP package HTTP::Date;
use strict;
our $VERSION = '6.08';
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(time2str str2time);
our @EXPORT_OK = qw(parse_date time2iso time2isoz);
require Time::Local;
our ( @DoW, @MoY, %MoY );
@DoW = qw(Sun Mon Tue Wed Thu Fri Sat);
@MoY = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
@MoY{@MoY} = ( 1 .. 12 );
my %GMT_ZONE = ( GMT => 1, UTC => 1, UT => 1, Z => 1 );
sub time2str (;$) {
my $time = shift;
$time = time unless defined $time;
my ( $sec, $min, $hour, $mday, $mon, $year, $wday ) = gmtime($time);
sprintf(
"%s, %02d %s %04d %02d:%02d:%02d GMT",
$DoW[$wday],
$mday, $MoY[$mon], $year + 1900,
$hour, $min, $sec
);
}
sub str2time ($;$) {
my $str = shift;
return undef unless defined $str;
# fast exit for strictly conforming string
if ( $str
=~ /^[SMTWF][a-z][a-z], ([0-9][0-9]) ([JFMAJSOND][a-z][a-z]) ([0-9][0-9][0-9][0-9]) ([0-9][0-9]):([0-9][0-9]):([0-9][0-9]) GMT$/
) {
return eval {
my $t = Time::Local::timegm( $6, $5, $4, $1, $MoY{$2} - 1, $3 );
$t < 0 ? undef : $t;
};
}
my @d = parse_date($str);
return undef unless @d;
$d[1]--; # month
my $tz = pop(@d);
unless ( defined $tz ) {
unless ( defined( $tz = shift ) ) {
return eval {
my $frac = $d[-1];
$frac -= ( $d[-1] = int($frac) );
my $t = Time::Local::timelocal( reverse @d ) + $frac;
$t < 0 ? undef : $t;
};
}
}
my $offset = 0;
if ( $GMT_ZONE{ uc $tz } ) {
# offset already zero
}
elsif ( $tz =~ /^([-+])?([0-9][0-9]?):?([0-9][0-9])?$/ ) {
$offset = 3600 * $2;
$offset += 60 * $3 if $3;
$offset *= -1 if $1 && $1 eq '-';
}
else {
eval { require Time::Zone } || return undef;
$offset = Time::Zone::tz_offset($tz);
return undef unless defined $offset;
}
return eval {
my $frac = $d[-1];
$frac -= ( $d[-1] = int($frac) );
my $t = Time::Local::timegm( reverse @d ) + $frac;
$t < 0 ? undef : $t - $offset;
};
}
sub parse_date ($) {
local ($_) = shift;
return unless defined;
# Reject over-long input up front, before any regex runs, so hostile
# strings cannot drive the parsing regexes into pathological backtracking.
# Length is measured as given (leading/trailing whitespace included). This
# cap is a security limit, not a tunable: every format we accept is far
# shorter, and the parsing regexes still contain adjacent unbounded
# quantifiers, so raising it demands re-benchmarking against hostile input.
return if length($_) > 64;
# More lax parsing below
s/^\s+//; # kill leading space
s/^(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)[a-z]*,?\s*//i; # Useless weekday
my ( $day, $mon, $yr, $hr, $min, $sec, $tz, $ampm );
# Then we are able to check for most of the formats with this regexp
(
( $day, $mon, $yr, $hr, $min, $sec, $tz )
= /^
([0-9][0-9]?) # day
(?:\s+|[-\/])
(\w+) # month
(?:\s+|[-\/])
([0-9]+) # year
(?:
(?:\s+|:) # separator before clock
([0-9][0-9]?):([0-9][0-9]) # hour:min
(?::([0-9][0-9]))? # optional seconds
)? # optional clock
\s*
([-+]?[0-9]{2,4}|(?![APap][Mm]\b)[A-Za-z]+)? # timezone
\s*
(?:\(\w+\)|\w{3,})? # ASCII representation of timezone.
\s*$
/x
)
||
# Try the ctime and asctime format
(
( $mon, $day, $hr, $min, $sec, $tz, $yr )
= /^
(\w{1,3}) # month
\s+
([0-9][0-9]?) # day
\s+
([0-9][0-9]?):([0-9][0-9]) # hour:min
(?::([0-9][0-9]))? # optional seconds
\s+
(?:([A-Za-z]+)\s+)? # optional timezone
([0-9]+) # year
\s*$ # allow trailing whitespace
/x
)
||
# Then the Unix 'ls -l' date format
(
( $mon, $day, $yr, $hr, $min, $sec )
= /^
(\w{3}) # month
\s+
([0-9][0-9]?) # day
\s+
(?:
([0-9][0-9][0-9][0-9]) | # year
([0-9]{1,2}):([0-9]{2}) # hour:min
(?::([0-9][0-9]))? # optional seconds
)
\s*$
/x
)
||
# ISO 8601 format '1996-02-29 12:00:00 -0100' and variants
(
( $yr, $mon, $day, $hr, $min, $sec, $tz )
= /^
([0-9]{4}) # year
[-\/]?
([0-9][0-9]?) # numerical month
[-\/]?
([0-9][0-9]?) # day
(?:
(?:\s+|[-:Tt]) # separator before clock
([0-9][0-9]?):?([0-9][0-9]) # hour:min
(?::?([0-9][0-9](?:\.[0-9]*)?))? # optional seconds (and fractional)
)? # optional clock
\s*
([-+]?[0-9][0-9]?:?(?:[0-9][0-9])?
|Z|z)? # timezone (Z is "zero meridian", i.e. GMT)
\s*$
/x
)
||
# Windows 'dir': '11-12-96 03:52PM' and four-digit year variant
(
( $mon, $day, $yr, $hr, $min, $ampm )
= /^
([0-9]{2}) # numerical month
-
([0-9]{2}) # day
-
([0-9]{2,4}) # year
\s+
([0-9][0-9]?):([0-9][0-9])([APap][Mm]) # hour:min AM or PM
\s*$
/x
)
|| return; # unrecognized format
# Translate month name to number
$mon
= $MoY{$mon}
|| $MoY{"\u\L$mon"}
|| ( $mon =~ /^[0-9][0-9]?$/ && $mon >= 1 && $mon <= 12 && int($mon) )
|| return;
# If the year is missing, we assume first date before the current,
# because of the formats we support such dates are mostly present
# on "ls -l" listings.
unless ( defined $yr ) {
my $cur_mon;
( $cur_mon, $yr ) = (localtime)[ 4, 5 ];
$yr += 1900;
$cur_mon++;
$yr-- if $mon > $cur_mon;
}
elsif ( length($yr) < 3 ) {
# Find "obvious" year
my $cur_yr = (localtime)[5] + 1900;
my $m = $cur_yr % 100;
my $tmp = $yr;
$yr += $cur_yr - $m;
$m -= $tmp;
$yr += ( $m > 0 ) ? 100 : -100
if abs($m) > 50;
}
# Make sure clock elements are defined
$hr = 0 unless defined($hr);
$min = 0 unless defined($min);
$sec = 0 unless defined($sec);
# Compensate for AM/PM
if ($ampm) {
$ampm = uc $ampm;
$hr = 0 if $hr == 12 && $ampm eq 'AM';
$hr += 12 if $ampm eq 'PM' && $hr != 12;
}
return ( $yr, $mon, $day, $hr, $min, $sec, $tz )
if wantarray;
if ( defined $tz ) {
$tz = "Z" if $tz =~ /^(GMT|UTC?|[-+]?0+)$/;
}
else {
$tz = "";
}
return sprintf(
"%04d-%02d-%02d %02d:%02d:%02d%s",
$yr, $mon, $day, $hr, $min, $sec, $tz
);
}
sub time2iso (;$) {
my $time = shift;
$time = time unless defined $time;
my ( $sec, $min, $hour, $mday, $mon, $year ) = localtime($time);
sprintf(
"%04d-%02d-%02d %02d:%02d:%02d",
$year + 1900, $mon + 1, $mday, $hour, $min, $sec
);
}
sub time2isoz (;$) {
my $time = shift;
$time = time unless defined $time;
my ( $sec, $min, $hour, $mday, $mon, $year ) = gmtime($time);
sprintf(
"%04d-%02d-%02d %02d:%02d:%02dZ",
$year + 1900, $mon + 1, $mday, $hour, $min, $sec
);
}
1;
# ABSTRACT: HTTP::Date - date conversion routines
#
__END__
=pod
=encoding UTF-8
=head1 NAME
HTTP::Date - HTTP::Date - date conversion routines
=head1 VERSION
version 6.08
=head1 SYNOPSIS
use HTTP::Date;
$string = time2str($time); # Format as GMT ASCII time
$time = str2time($string); # convert ASCII date to machine time
=head1 DESCRIPTION
This module provides functions that deal the date formats used by the
HTTP protocol (and then some more). Only the first two functions,
time2str() and str2time(), are exported by default.
=over 4
=item time2str( [$time] )
The time2str() function converts a machine time (seconds since epoch)
to a string. If the function is called without an argument or with an
undefined argument, it will use the current time.
The string returned is in the format preferred for the HTTP protocol.
This is a fixed length subset of the format defined by RFC 1123,
represented in Universal Time (GMT). An example of a time stamp
in this format is:
Sun, 06 Nov 1994 08:49:37 GMT
=item str2time( $str [, $zone] )
The str2time() function converts a string to machine time. It returns
C if the format of $str is unrecognized, otherwise whatever the
C functions can make out of the parsed time. Dates
before the system's epoch may not work on all operating systems. The
time formats recognized are the same as for parse_date().
The function also takes an optional second argument that specifies the
default time zone to use when converting the date. This parameter is
ignored if the zone is found in the date string itself. If this
parameter is missing, and the date string format does not contain any
zone specification, then the local time zone is assumed.
If the zone is not "C" or numerical (like "C<-0800>" or
"C<+0100>"), then the C module must be installed in order
to get the date recognized.
=item parse_date( $str )
This function will try to parse a date string, and then return it as a
list of numerical values followed by a (possible undefined) time zone
specifier; ($year, $month, $day, $hour, $min, $sec, $tz). The $year
will be the full 4-digit year, and $month numbers start with 1 (for January).
In scalar context the numbers are interpolated in a string of the
"YYYY-MM-DD hh:mm:ss TZ"-format and returned.
If the date is unrecognized, then the empty list is returned (C in
scalar context).
As a safeguard against pathological input, strings longer than 64
characters are rejected without being parsed. The length is measured on the
string as given, before any leading or trailing whitespace is trimmed, so
heavily padded input may be rejected even if its trimmed payload would fit.
Every date format this module recognizes is far shorter than this limit.
The function is able to parse the following formats:
"Wed, 09 Feb 1994 22:23:32 GMT" -- HTTP format
"Thu Feb 3 17:03:55 GMT 1994" -- ctime(3) format
"Thu Feb 3 00:00:00 1994", -- ANSI C asctime() format
"Tuesday, 08-Feb-94 14:15:29 GMT" -- old rfc850 HTTP format
"Tuesday, 08-Feb-1994 14:15:29 GMT" -- broken rfc850 HTTP format
"03/Feb/1994:17:03:55 -0700" -- common logfile format
"09 Feb 1994 22:23:32 GMT" -- HTTP format (no weekday)
"08-Feb-94 14:15:29 GMT" -- rfc850 format (no weekday)
"08-Feb-1994 14:15:29 GMT" -- broken rfc850 format (no weekday)
"1994-02-03 14:15:29 -0100" -- ISO 8601 format
"1994-02-03 14:15:29" -- zone is optional
"1994-02-03" -- only date
"1994-02-03T14:15:29" -- Use T as separator
"19940203T141529Z" -- ISO 8601 compact format
"19940203" -- only date
"08-Feb-94" -- old rfc850 HTTP format (no weekday, no time)
"08-Feb-1994" -- broken rfc850 HTTP format (no weekday, no time)
"09 Feb 1994" -- proposed new HTTP format (no weekday, no time)
"03/Feb/1994" -- common logfile format (no time, no offset)
"Feb 3 1994" -- Unix 'ls -l' format
"Feb 3 17:03" -- Unix 'ls -l' format
"11-15-96 03:52PM" -- Windows 'dir' format
"11-15-1996 03:52PM" -- Windows 'dir' format with four-digit year
The parser ignores leading and trailing whitespace. It also allow the
seconds to be missing and the month to be numerical in most formats.
Numeric-only dates use day/month/year ordering (the ISO and common
European convention), not the US month/day/year ordering. So
"3/4/2014" is parsed as 4 March 2014, and a US-style date such as
"3/13/2014" returns undef because 13 is not a valid month. To parse
US-style dates, swap the first two fields before calling parse_date().
If the year is missing, then we assume that the date is the first
matching date I current month. If the year is given with only
2 digits, then parse_date() will select the century that makes the
year closest to the current date.
=item time2iso( [$time] )
Same as time2str(), but returns a "YYYY-MM-DD hh:mm:ss"-formatted
string representing time in the local time zone.
=item time2isoz( [$time] )
Same as time2str(), but returns a "YYYY-MM-DD hh:mm:ssZ"-formatted
string representing Universal Time.
=back
=head1 SEE ALSO
L, L
=head1 AUTHOR
Gisle Aas
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 1995 by Gisle Aas.
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
unicode-digits.t 100644 001750 001751 2725 15223600650 15554 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/t #!perl
use strict;
use warnings;
use Test::More;
use HTTP::Date qw(str2time parse_date);
# Regression test: date parsing must accept ASCII digits only.
#
# Perl's \d matches any Unicode digit, so a date written with non-ASCII
# digits (e.g. Arabic-Indic U+0660..U+0669) used to match the parsing
# regexes. Those Unicode digits then coerced to 0 numerically, so the
# string was "parsed" into a bogus date instead of being rejected.
#
# After hardening the regexes to [0-9], such strings must not parse.
# Map ASCII 0-9 to the corresponding Arabic-Indic digit U+0660..U+0669.
sub to_unicode_digits {
my ($str) = @_;
$str =~ s/([0-9])/chr( 0x0660 + $1 )/ge;
return $str;
}
my @ascii_dates = (
'Thu, 03 Feb 1994 00:00:00 GMT', # fast-path RFC 1123 format
'03/Feb/1994:00:00:00 0000', # common logfile format
'03-Feb-1994 00:00:00 GMT', # rfc850 (no weekday)
'1994-02-03 00:00:00', # ISO 8601
);
for my $ascii (@ascii_dates) {
my $unicode = to_unicode_digits($ascii);
# Sanity: the ASCII form still parses, the Unicode form differs from it.
ok( defined str2time($ascii), "ASCII date still parses: $ascii" );
isnt( $unicode, $ascii, 'Unicode-digit string differs from ASCII' );
is( str2time($unicode), undef,
'str2time rejects Unicode-digit date (not parsed as 0)' );
is( scalar parse_date($unicode), undef,
'parse_date rejects Unicode-digit date' );
}
done_testing;
mojibake.t 100644 001750 001751 151 15223600650 16067 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/xt/author #!perl
use strict;
use warnings qw(all);
use Test::More;
use Test::Mojibake;
all_files_encoding_ok();
pod-spell.t 100644 001750 001751 2156 15223600650 16234 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/xt/author use strict;
use warnings;
use Test::More;
# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007006
use Test::Spelling 0.17;
use Pod::Wordlist;
add_stopwords();
all_pod_files_spelling_ok( qw( bin lib ) );
__DATA__
49699333
Aas
Adam
Alders
Alders'
Alex
Alexey
Andreas
Bill
Bron
Burke
Chrysostomos
DAVIDRW
Daniel
Date
David
Denaxas
FWILES
Father
Finch
Froehlich
Gavin
Gisle
Gondwana
Graeme
Grossmann
HTTP
Hanak
Hans
Hay
Hedlund
Hukins
Ian
Jacob
James
Josef
Kapranoff
Karaban
Kennedy
Kilgore
Koenig
Kyle
Lipcon
Ludlam
Mann
Mark
Michal
Mike
Olaf
Ondrej
Peter
Peters
Philip
Rabbitson
Raspass
Rezic
Robert
Rolf
Rothenberg
Schilli
Sean
Sjogren
Skyttä
Slaven
Spiros
Steve
SteveHay
Stone
Stosberg
TZ
Thompson
Todd
Tom
Tony
Toru
Tourbin
Ville
Wheeler
Wright
YYYY
Yamaguchi
Yuri
Zefram
adamk
amir
amire80
andreas
asjo
at
brong
david
davidrw
denaxas
dependabot
dot
gisle
github
gpeters
hfroehlich
iank
jefflee
john9art
jraspass
ka
kyle
lib
ludlam
mark
michal
mschilli
murphy
olaf
ondrej
perl
phrstbrn
pnull
rg
ribasushi
ruff
sasao
sburke
shaohua
slaven
sprout
talby
tech
todd
tom
uid39246
ville
waif
wfmann
zefram
zigorou
Špaček
00-report-prereqs.t 100644 001750 001751 13601 15223600650 16067 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/t #!perl
use strict;
use warnings;
# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.029
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 grep { $_ eq $mod } @exclude;
my $want = $req_hash->{$phase}{$type}{$mod};
$want = "undef" unless defined $want;
$want = "any" if !$want && $want == 0;
if ($mod eq 'perl') {
push @reports, ['perl', $want, $]];
next;
}
my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required";
my $file = $mod;
$file =~ s{::}{/}g;
$file .= ".pm";
my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC;
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('Reported prereqs');
# vim: ts=4 sts=4 sw=4 et:
pod-syntax.t 100644 001750 001751 251 15223600650 16415 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/xt/author #!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();
00-report-prereqs.dd 100644 001750 001751 6151 15223600650 16175 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/t do { my $x = {
'configure' => {
'requires' => {
'ExtUtils::MakeMaker' => '0'
},
'suggests' => {
'JSON::PP' => '2.27300'
}
},
'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',
'Encode' => '0',
'Parallel::ForkManager' => '1.19',
'Perl::Critic' => '1.132',
'Perl::Tidy' => '20180220',
'Pod::Coverage::TrustPod' => '0',
'Pod::Wordlist' => '0',
'Test::CPAN::Changes' => '0.19',
'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.17',
'Test::Vars' => '0.014',
'Test::Version' => '1',
'warnings' => '0'
}
},
'runtime' => {
'requires' => {
'Exporter' => '0',
'Time::Local' => '1.28',
'Time::Zone' => '0',
'perl' => '5.006002',
'strict' => '0'
}
},
'test' => {
'recommends' => {
'CPAN::Meta' => '2.120900'
},
'requires' => {
'ExtUtils::MakeMaker' => '0',
'File::Spec' => '0',
'IO::Handle' => '0',
'IPC::Open3' => '0',
'Test::More' => '0.96',
'Time::HiRes' => '0',
'warnings' => '0'
}
}
};
$x;
} numeric-date-order.t 100644 001750 001751 2226 15223600650 16327 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/t #!perl
use strict;
use warnings;
use Test::More;
use HTTP::Date qw(str2time parse_date);
# Regression/characterization test for GitHub #10 (rt.cpan.org #94151).
#
# Numeric-only slash dates are parsed in day/month/year order (the ISO and
# common European convention), NOT US month/day/year order. This is a
# deliberate, documented contract: changing it would silently re-interpret
# existing dates for every downstream caller.
#
# So '3/12/2014' is 12 March-style ordering => day 3, month 12 (December),
# and '3/13/2014' is rejected because 13 is not a valid month.
is(
str2time( '3/12/2014 0:00', 'GMT' ),
str2time( '3 Dec 2014 0:00', 'GMT' ),
'numeric N/N/YYYY uses day/month order: 3/12 == 3 December'
);
is( str2time( '3/13/2014 0:00', 'GMT' ),
undef, 'second field is the month: 13 is invalid, so undef' );
is( str2time( '13/3/2014 0:00', 'GMT' ),
str2time( '13 Mar 2014 0:00', 'GMT' ),
'day may exceed 12: 13/3 == 13 March' );
# parse_date reports the same day/month ordering.
is_deeply(
[ ( parse_date('3/12/2014') )[ 0, 1, 2 ] ],
[ 2014, 12, 3 ],
'parse_date(3/12/2014) => year 2014, month 12, day 3'
);
done_testing;
portability.t 100644 001750 001751 130 15223600650 16645 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/xt/author use strict;
use warnings;
use Test::More;
use Test::Portability::Files;
run_tests();
pod-coverage.t 100644 001750 001751 1720 15223600650 16704 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/xt/author #!perl
# This file was automatically generated by Dist::Zilla::Plugin::Test::Pod::Coverage::Configurable 0.07.
use Test::Pod::Coverage 1.08;
use Test::More 0.88;
BEGIN {
if ( $] <= 5.008008 ) {
plan skip_all => 'These tests require Pod::Coverage::TrustPod, which only works with Perl 5.8.9+';
}
}
use Pod::Coverage::TrustPod;
my %skip = map { $_ => 1 } qw( );
my @modules;
for my $module ( all_modules() ) {
next if $skip{$module};
push @modules, $module;
}
plan skip_all => 'All the modules we found were excluded from POD coverage test.'
unless @modules;
plan tests => scalar @modules;
my %trustme = ();
my @also_private;
for my $module ( sort @modules ) {
pod_coverage_ok(
$module,
{
coverage_class => 'Pod::Coverage::TrustPod',
also_private => \@also_private,
trustme => $trustme{$module} || [],
},
"pod coverage for $module"
);
}
done_testing();
test-version.t 100644 001750 001751 637 15223600650 16761 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/xt/author 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;
release 000755 001750 001751 0 15223600650 14122 5 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/xt cpan-changes.t 100644 001750 001751 344 15223600650 16757 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/xt/release use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::CPAN::Changes 0.013
use Test::More 0.96 tests => 1;
use Test::CPAN::Changes;
subtest 'changes_ok' => sub {
changes_file_ok('Changes');
};
changes_has_content.t 100644 001750 001751 2530 15223600650 20444 0 ustar 00olaf olaf 000000 000000 HTTP-Date-6.08/xt/release use Test::More tests => 2;
if (($ENV{TRAVIS_PULL_REQUEST} || '') eq 'false') {
chomp(my $branch_name = ($ENV{TRAVIS_BRANCH} || `git rev-parse --abbrev-ref HEAD`));
$TODO = 'Changes need not have content for this release yet if this is only the master branch'
if ($branch_name || '') eq 'master';
}
note 'Checking Changes';
my $changes_file = 'Changes';
my $newver = '6.08';
my $trial_token = '-TRIAL';
my $encoding = 'UTF-8';
SKIP: {
ok(-e $changes_file, "$changes_file file exists")
or skip 'Changes is missing', 1;
ok(_get_changes($newver), "$changes_file has content for $newver");
}
done_testing;
sub _get_changes
{
my $newver = shift;
# parse changelog to find commit message
open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!";
my $changelog = join('', <$fh>);
if ($encoding) {
require Encode;
$changelog = Encode::decode($encoding, $changelog, Encode::FB_CROAK());
}
close $fh;
my @content =
grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented
split /\n/, $changelog;
shift @content; # drop the version line
# drop unindented last line and trailing blank lines
pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ );
# return number of non-blank lines
return scalar @content;
}