Projects
Mega:23.09
perl-Time-Local
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
_service:tar_scm:perl-Time-Local.spec
Changed
@@ -1,10 +1,10 @@ %global base_name Time-Local -%global base_version 1.30 +%global base_version 1.35 Name: perl-%{base_name} Epoch: 2 Version: %{base_version}0 -Release: 2 +Release: 1 Summary: Efficiently compute time from local and GMT time License: GPL+ or Artistic URL: https://metacpan.org/release/%{base_name} @@ -47,6 +47,9 @@ %{_mandir}/man3/* %changelog +* Wed Oct 25 2023 wangyuhang <wangyuhang27@huawei.com> - 2:1.350-1 +- upgrade to version 1.35 + * Wed Oct 26 2022 wangyuhang <wangyuhang27@huawei.com> - 2:1.300-2 - use base_name to opitomize the specfile
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="url">git@gitee.com:src-openeuler/perl-Time-Local.git</param> <param name="scm">git</param> - <param name="revision">openEuler-23.09</param> + <param name="revision">master</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
View file
_service:tar_scm:Time-Local-1.30.tar.gz/tidyall.ini
Deleted
@@ -1,27 +0,0 @@ -ignore = .build/**/* -ignore = Time-Local-*/**/* -ignore = blib/**/* -ignore = t/00-* -ignore = t/author-* -ignore = t/release-* -ignore = t/zzz-* -ignore = xt/**/* - -PerlCritic -select = **/*.{pl,pm,t,psgi} -argv = --profile=$ROOT/perlcriticrc - -PerlCritic non-auto-generated xt -select = xt/author/tz.t -argv = --profile=$ROOT/perlcriticrc - -PerlTidy -select = **/*.{pl,pm,t,psgi} -argv = --profile=$ROOT/perltidyrc - -PerlTidy non-auto-generated xt -select = xt/author/tz.t -argv = --profile=$ROOT/perltidyrc - -Test::Vars -select = **/*.pm
View file
_service:tar_scm:Time-Local-1.30.tar.gz/xt/author/tidyall.t
Deleted
@@ -1,16 +0,0 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Test::TidyAll v$VERSION - -use Test::More 0.88; -BEGIN { - if ( $ < 5.010 ) { - plan skip_all => 'This test requires Perl version 5.010'; - } -} -use Test::Code::TidyAll 0.24; - -tidyall_ok( - verbose => ( exists $ENV{TEST_TIDYALL_VERBOSE} ? $ENV{TEST_TIDYALL_VERBOSE} : 1 ), - jobs => ( exists $ENV{TEST_TIDYALL_JOBS} ? $ENV{TEST_TIDYALL_JOBS} : 4 ), -); - -done_testing;
View file
_service:tar_scm:Time-Local-1.30.tar.gz/CONTRIBUTING.md -> _service:tar_scm:Time-Local-1.35.tar.gz/CONTRIBUTING.md
Changed
@@ -14,7 +14,7 @@ Dist::Zilla(https://metacpan.org/release/Dist-Zilla). However, you can still compile and test the code with the -`MakeFile.PL` +`Makefile.PL` in the repository: perl Makefile.PL @@ -29,37 +29,37 @@ You can use `cpanminus`(https://metacpan.org/pod/App::cpanminus) to do this without downloading the tarball first: - $ cpanm --reinstall --installdeps --with-recommends Time::Local + $> cpanm --reinstall --installdeps --with-recommends Time::Local `Dist::Zilla`(https://metacpan.org/pod/Dist::Zilla) is a very powerful authoring tool, but requires a number of author-specific plugins. If you would like to use it for contributing, install it from CPAN, then the following command to install the needed distros: - $ dzil authordeps --missing | cpanm + $> dzil authordeps --missing | cpanm There may also be additional requirements not needed by the dzil build which are needed for tests or other development: - $ dzil listdeps --author --missing | cpanm + $> dzil listdeps --author --missing | cpanm Or, you can use the 'dzil stale' command to install all requirements at once: - $ cpanm Dist::Zilla::App::Command::stale - $ dzil stale --all | cpanm + $> cpanm Dist::Zilla::App::Command::stale + $> dzil stale --all | cpanm You can also do this via cpanm directly: - $ cpanm --reinstall --installdeps --with-develop --with-recommends Time::Local + $> cpanm --reinstall --installdeps --with-develop --with-recommends Time::Local Once installed, here are some dzil commands you might try: - $ dzil build - $ dzil test - $ dzil test --release - $ dzil xtest - $ dzil listdeps --json - $ dzil build --notgz + $> dzil build + $> dzil test + $> dzil test --release + $> dzil xtest + $> dzil listdeps --json + $> dzil build --notgz You can learn more about Dist::Zilla at http://dzil.org/. @@ -74,24 +74,32 @@ If you have found a bug, but do not have an accompanying patch to fix it, you can submit an issue report via the web(https://github.com/houseabsolute/Time-Local/issues). +## Continuous Integration -There is a mailing list available for users of this distribution, -datetime@perl.org +All pull requests for this distribution will be automatically tested using +Azure Pipelines(https://dev.azure.com/houseabsolute/houseabsolute/_build). +All CI results will be visible in the pull request on GitHub. Follow the +appropriate links for details when tests fail. PRs cannot be merged until tests +pass. +## Precious -## TidyAll +This distribution uses precious(https://github.com/houseabsolute/precious) +to enforce a uniform coding style. This is tested as part of the author +testing suite. You can install this and any other necessary non-Perl tools by +running `./dev-bin/install-xt-tools.sh`. -This distribution uses -Code::TidyAll(https://metacpan.org/release/Code-TidyAll) to enforce a -uniform coding style. This is tested as part of the author testing suite. You -can install and run tidyall by running the following commands: +Then you can use `precious` to tidy and lint your code: - $ cpanm Code::TidyAll - $ tidyall -a + $> precious tidy -a + $> precious lint -a -Please run this before committing your changes and address any issues it -brings up. +Please run `precious tidy -a` and `precious lint -a` before committing your +changes and address any issues that it reports. + +You can also set up a git pre-commit hook that checks all changed files for +linting issues by running `./git/setup.pl`. ## Contributor Names @@ -103,5 +111,5 @@ ## Generated By -This file was generated via Dist::Zilla::Plugin::GenerateFile::FromShareDir 0.014 from a -template file originating in Dist-Zilla-PluginBundle-DROLSKY-1.05. +This file was generated via Dist::Zilla::Plugin::GenerateFile::FromShareDir 0.015 from a +template file originating in Dist-Zilla-PluginBundle-DROLSKY-1.22.
View file
_service:tar_scm:Time-Local-1.30.tar.gz/Changes -> _service:tar_scm:Time-Local-1.35.tar.gz/Changes
Changed
@@ -1,6 +1,52 @@ +1.35 2023-04-29 + +- This is the same as 1.34. + +- The code now explicitly handles non-integer seconds values. This fixes the + confusing things that timelocal() does with non-integer seconds but does not + turn the seconds value into an integer. Based on a bug report from Dmitriy + Shamatrin. GH #18. + + +1.34 2023-03-25 (TRIAL RELEASE) + +- Fix for test failures seen on 32-bit systems with older Perl versions. + + +1.33 2023-02-12 (TRIAL RELEASE) + +- Fix for breakage on (some?) 32-bit platforms. If an integer calculation done + internally overflowed all calls to this module's subs could error with "Day + too big - 105412 > -2147483648". This fix reduces the range of acceptable + epochs but should make the module usable again on such systems. + + +1.32 2023-02-12 (TRIAL RELEASE) + +- This is an alternative to the changes in the 1.31 release. Instead of + restoring "use integer", the code now explicitly handles non-integer seconds + values. This fixes the confusing things that timelocal() does with + non-integer seconds but does not turn the seconds value into an + integer. Based on a bug report from Dmitriy Shamatrin. GH #18. + + +1.31 2021-11-09 (TRIAL RELEASE) + +- Restored the use of "use integer", which was removed in 2010 as part of the + change to support a 64-bit time_t in Perl, regardless of the platform. The + timelocal() sub does very confusing things with non-integer seconds because + internally it calls the system's localtime() function. And that localtime() + function may strip off the non-integer portion of the seconds value. This + leads to extremely confusing results because of the math that this module + does on the return value of localtime() internally. + + With "use integer" back in effect the results are much more + predictable. Based on a bug report from Dmitriy Shamatrin. GH #18. + + 1.30 2020-01-26 -- Identical to 1.30. +- Identical to 1.29. 1.29 2020-01-18 (TRIAL RELEASE) @@ -80,6 +126,11 @@ 1.1902 2010-12-16 TRIAL RELEASE - Merge all changes from blead perl. + +- This release removes `use integer` from the code, which means that if you + pass in non-integer values for seconds, you will get a non-integer value + back. + - Try to restore compatibility with older perls, which don't have a 64bit capable localtime/gmtime.
View file
_service:tar_scm:Time-Local-1.30.tar.gz/INSTALL -> _service:tar_scm:Time-Local-1.35.tar.gz/INSTALL
Changed
@@ -21,8 +21,11 @@ ## Manual installation -As a last resort, you can manually install it. Download the tarball, untar it, -install configure prerequisites (see below), then build it: +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/Time::Local + +Untar the tarball, install configure prerequisites (see below), then build it: % perl Makefile.PL % make && make test
View file
_service:tar_scm:Time-Local-1.30.tar.gz/LICENSE -> _service:tar_scm:Time-Local-1.35.tar.gz/LICENSE
Changed
@@ -1,4 +1,4 @@ -This software is copyright (c) 1997 - 2020 by Graham Barr & Dave Rolsky. +This software is copyright (c) 1997 - 2023 by Graham Barr & Dave Rolsky. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. @@ -12,7 +12,7 @@ --- The GNU General Public License, Version 1, February 1989 --- -This software is Copyright (c) 1997 - 2020 by Graham Barr & Dave Rolsky. +This software is Copyright (c) 1997 - 2023 by Graham Barr & Dave Rolsky. This is free software, licensed under: @@ -272,7 +272,7 @@ --- The Artistic License 1.0 --- -This software is Copyright (c) 1997 - 2020 by Graham Barr & Dave Rolsky. +This software is Copyright (c) 1997 - 2023 by Graham Barr & Dave Rolsky. This is free software, licensed under: @@ -292,21 +292,21 @@ - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through - textual modification. + 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. + Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for - the package. + 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.) + 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. + 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 @@ -373,7 +373,7 @@ 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End
View file
_service:tar_scm:Time-Local-1.30.tar.gz/MANIFEST -> _service:tar_scm:Time-Local-1.35.tar.gz/MANIFEST
Changed
@@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.030. CODE_OF_CONDUCT.md CONTRIBUTING.md Changes @@ -11,14 +11,17 @@ README.md azure-pipelines.yml cpanfile +dev-bin/install-xt-tools.sh dist.ini +git/hooks/pre-commit.sh +git/setup.pl lib/Time/Local.pm perlcriticrc perltidyrc +precious.toml t/00-report-prereqs.dd t/00-report-prereqs.t t/Local.t -tidyall.ini xt/author/00-compile.t xt/author/clean-namespaces.t xt/author/eol.t @@ -28,8 +31,8 @@ xt/author/pod-spell.t xt/author/pod-syntax.t xt/author/portability.t +xt/author/precious.t xt/author/test-version.t -xt/author/tidyall.t xt/author/tz.t xt/release/cpan-changes.t xt/release/meta-json.t
View file
_service:tar_scm:Time-Local-1.30.tar.gz/META.json -> _service:tar_scm:Time-Local-1.35.tar.gz/META.json
Changed
@@ -4,7 +4,7 @@ "Dave Rolsky <autarch@urth.org>" , "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010", "license" : "perl_5" , @@ -21,22 +21,23 @@ }, "develop" : { "requires" : { - "Code::TidyAll" : "0.56", - "Code::TidyAll::Plugin::SortLines::Naturally" : "0.000003", - "Code::TidyAll::Plugin::Test::Vars" : "0.02", + "Capture::Tiny" : "0", + "Encode" : "0", "File::Spec" : "0", + "FindBin" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "POSIX" : "0", - "Parallel::ForkManager" : "1.19", - "Perl::Critic" : "1.126", - "Perl::Tidy" : "20160302", + "Perl::Critic" : "1.138", + "Perl::Critic::Moose" : "1.05", + "Perl::Tidy" : "20210111", + "Pod::Checker" : "1.74", "Pod::Coverage::TrustPod" : "0", + "Pod::Tidy" : "0.10", "Pod::Wordlist" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta::JSON" : "0.16", "Test::CleanNamespaces" : "0.15", - "Test::Code::TidyAll" : "0.50", "Test::EOL" : "0", "Test::Mojibake" : "0", "Test::More" : "0.96", @@ -45,7 +46,6 @@ "Test::Pod::Coverage" : "1.08", "Test::Portability::Files" : "0", "Test::Spelling" : "0.12", - "Test::Vars" : "0.009", "Test::Version" : "2.05", "perl" : "5.006", "warnings" : "0" @@ -75,7 +75,7 @@ "provides" : { "Time::Local" : { "file" : "lib/Time/Local.pm", - "version" : "1.30" + "version" : "1.35" } }, "release_status" : "stable", @@ -83,7 +83,7 @@ "bugtracker" : { "web" : "https://github.com/houseabsolute/Time-Local/issues" }, - "homepage" : "http://metacpan.org/release/Time-Local", + "homepage" : "https://metacpan.org/release/Time-Local", "repository" : { "type" : "git", "url" : "git://github.com/houseabsolute/Time-Local.git", @@ -91,13 +91,18 @@ }, "x_MailingList" : "datetime@perl.org" }, - "version" : "1.30", + "version" : "1.35", "x_Dist_Zilla" : { "perl" : { - "version" : "5.030001" + "version" : "5.032001" }, "plugins" : { + "class" : "Dist::Zilla::Plugin::DROLSKY::BundleAuthordep", + "name" : "@DROLSKY/DROLSKY::BundleAuthordep", + "version" : "1.22" + }, + { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { @@ -121,32 +126,32 @@ } }, "name" : "@DROLSKY/Git::GatherDir", - "version" : "2.046" + "version" : "2.048" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@DROLSKY/ManifestSkip", - "version" : "6.012" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@DROLSKY/License", - "version" : "6.012" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@DROLSKY/ExecDir", - "version" : "6.012" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@DROLSKY/ShareDir", - "version" : "6.012" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@DROLSKY/Manifest", - "version" : "6.012" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::CheckVersionIncrement", @@ -156,17 +161,17 @@ { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@DROLSKY/TestRelease", - "version" : "6.012" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@DROLSKY/ConfirmRelease", - "version" : "6.012" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@DROLSKY/UploadToCPAN", - "version" : "6.012" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::VersionFromMainModule", @@ -187,7 +192,7 @@ { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@DROLSKY/AutoPrereqs", - "version" : "6.012" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", @@ -197,7 +202,7 @@ { "class" : "Dist::Zilla::Plugin::GitHub::Meta", "name" : "@DROLSKY/GitHub::Meta", - "version" : "0.47" + "version" : "0.48" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", @@ -207,12 +212,12 @@ } }, "name" : "@DROLSKY/GitHub::Update", - "version" : "0.47" + "version" : "0.48" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "@DROLSKY/MetaResources", - "version" : "6.012" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", @@ -222,7 +227,7 @@ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM", - "version" : "6.012" + "version" : "6.030" } , "include_underscores" : 0 @@ -249,22 +254,22 @@ { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@DROLSKY/MetaConfig", - "version" : "6.012" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@DROLSKY/MetaJSON", - "version" : "6.012"
View file
_service:tar_scm:Time-Local-1.30.tar.gz/META.yml -> _service:tar_scm:Time-Local-1.35.tar.gz/META.yml
Changed
@@ -10,7 +10,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010' +generated_by: 'Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -19,7 +19,7 @@ provides: Time::Local: file: lib/Time/Local.pm - version: '1.30' + version: '1.35' requires: Carp: '0' Exporter: '0' @@ -29,14 +29,18 @@ resources: MailingList: datetime@perl.org bugtracker: https://github.com/houseabsolute/Time-Local/issues - homepage: http://metacpan.org/release/Time-Local + homepage: https://metacpan.org/release/Time-Local repository: git://github.com/houseabsolute/Time-Local.git -version: '1.30' +version: '1.35' x_Dist_Zilla: perl: - version: '5.030001' + version: '5.032001' plugins: - + class: Dist::Zilla::Plugin::DROLSKY::BundleAuthordep + name: '@DROLSKY/DROLSKY::BundleAuthordep' + version: '1.22' + - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: @@ -56,27 +60,27 @@ Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: '@DROLSKY/Git::GatherDir' - version: '2.046' + version: '2.048' - class: Dist::Zilla::Plugin::ManifestSkip name: '@DROLSKY/ManifestSkip' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::License name: '@DROLSKY/License' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::ExecDir name: '@DROLSKY/ExecDir' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::ShareDir name: '@DROLSKY/ShareDir' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::Manifest name: '@DROLSKY/Manifest' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::CheckVersionIncrement name: '@DROLSKY/CheckVersionIncrement' @@ -84,15 +88,15 @@ - class: Dist::Zilla::Plugin::TestRelease name: '@DROLSKY/TestRelease' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@DROLSKY/ConfirmRelease' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@DROLSKY/UploadToCPAN' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::VersionFromMainModule config: @@ -108,7 +112,7 @@ - class: Dist::Zilla::Plugin::AutoPrereqs name: '@DROLSKY/AutoPrereqs' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::CopyFilesFromBuild name: '@DROLSKY/CopyFilesFromBuild' @@ -116,18 +120,18 @@ - class: Dist::Zilla::Plugin::GitHub::Meta name: '@DROLSKY/GitHub::Meta' - version: '0.47' + version: '0.48' - class: Dist::Zilla::Plugin::GitHub::Update config: Dist::Zilla::Plugin::GitHub::Update: metacpan: 1 name: '@DROLSKY/GitHub::Update' - version: '0.47' + version: '0.48' - class: Dist::Zilla::Plugin::MetaResources name: '@DROLSKY/MetaResources' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::MetaProvides::Package config: @@ -136,7 +140,7 @@ - class: Dist::Zilla::Plugin::FinderCode name: '@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM' - version: '6.012' + version: '6.030' include_underscores: 0 Dist::Zilla::Role::MetaProvider::Provider: $Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002004' @@ -155,19 +159,19 @@ - class: Dist::Zilla::Plugin::MetaConfig name: '@DROLSKY/MetaConfig' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::MetaJSON name: '@DROLSKY/MetaJSON' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::MetaYAML name: '@DROLSKY/MetaYAML' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::NextRelease name: '@DROLSKY/NextRelease' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::Prereqs config: @@ -175,15 +179,15 @@ phase: test type: requires name: '@DROLSKY/Test::More with subtest' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires - name: '@DROLSKY/Modules for use with tidyall' - version: '6.012' + name: '@DROLSKY/Tools for use with precious' + version: '6.030' - class: Dist::Zilla::Plugin::Prereqs config: @@ -191,7 +195,7 @@ phase: develop type: requires name: '@DROLSKY/Test::Version which fixes https://github.com/plicease/Test-Version/issues/7' - version: '6.012' + version: '6.030' - class: Dist::Zilla::Plugin::PromptIfStale config: @@ -204,7 +208,7 @@ run_under_travis: 0 skip: name: '@DROLSKY/Dist::Zilla::PluginBundle::DROLSKY' - version: '0.055' + version: '0.057' - class: Dist::Zilla::Plugin::PromptIfStale config: @@ -215,14 +219,18 @@ phase: release run_under_travis: 0 skip: + - Dist::Zilla::Plugin::DROLSKY::BundleAuthordep - Dist::Zilla::Plugin::DROLSKY::Contributors
View file
_service:tar_scm:Time-Local-1.30.tar.gz/Makefile.PL -> _service:tar_scm:Time-Local-1.35.tar.gz/Makefile.PL
Changed
@@ -1,6 +1,6 @@ # This Makefile.PL for Time-Local was generated by -# Dist::Zilla::Plugin::DROLSKY::MakeMaker 1.05 -# and Dist::Zilla::Plugin::MakeMaker::Awesome 0.48. +# Dist::Zilla::Plugin::DROLSKY::MakeMaker 1.22 +# and Dist::Zilla::Plugin::MakeMaker::Awesome 0.49. # Don't edit it but the dist.ini and plugins used to construct it. use strict; @@ -30,7 +30,7 @@ "Test::More" => "0.96", "warnings" => 0 }, - "VERSION" => "1.30", + "VERSION" => "1.35", "test" => { "TESTS" => "t/*.t" }
View file
_service:tar_scm:Time-Local-1.30.tar.gz/README.md -> _service:tar_scm:Time-Local-1.35.tar.gz/README.md
Changed
@@ -4,7 +4,7 @@ # VERSION -version 1.30 +version 1.35 # SYNOPSIS @@ -31,6 +31,8 @@ ## `timelocal_posix()` and `timegm_posix()` +_Since version 1.30._ + These functions are the exact inverse of Perl's built-in `localtime` and `gmtime` functions. That means that calling `timelocal_posix( localtime($value) )` will always give you the same `$value` you started @@ -43,9 +45,9 @@ These functions expect the year value to be the number of years since 1900, which is what the `localtime()` and `gmtime()` built-ins returns. -They perform range checking by default on the input `$sec`, `$min`, -`$hour`, `$mday`, and `$mon` values and will croak (using `Carp::croak()`) -if given a value outside the allowed ranges. +They perform range checking by default on the input `$sec`, `$min`, `$hour`, +`$mday`, and `$mon` values and will croak (using `Carp::croak()`) if given a +value outside the allowed ranges. While it would be nice to make this the default behavior, that would almost certainly break a lot of code, so you must explicitly import these functions @@ -57,6 +59,8 @@ ## `timelocal_modern()` and `timegm_modern()` +_Since version 1.27._ + When `Time::Local` was first written, it was a common practice to represent years as a two-digit value like `99` for `1999` or `1` for `2001`. This caused all sorts of problems (google "Y2K problem" if you're very young) and @@ -66,26 +70,26 @@ calculation when given a year value less than 1000. This leads to surprising results in many cases. See "Year Value Interpretation"(#year-value-interpretation) for details. -The `time*_modern()` functions do not do this year munging and simply take -the year value as provided. +The `time*_modern()` functions do not do this year munging and simply take the +year value as provided. -They perform range checking by default on the input `$sec`, `$min`, -`$hour`, `$mday`, and `$mon` values and will croak (using `Carp::croak()`) -if given a value outside the allowed ranges. +They perform range checking by default on the input `$sec`, `$min`, `$hour`, +`$mday`, and `$mon` values and will croak (using `Carp::croak()`) if given a +value outside the allowed ranges. ## `timelocal()` and `timegm()` This module exports two functions by default, `timelocal()` and `timegm()`. -They perform range checking by default on the input `$sec`, `$min`, -`$hour`, `$mday`, and `$mon` values and will croak (using `Carp::croak()`) -if given a value outside the allowed ranges. +They perform range checking by default on the input `$sec`, `$min`, `$hour`, +`$mday`, and `$mon` values and will croak (using `Carp::croak()`) if given a +value outside the allowed ranges. -**Warning: The year value interpretation that these functions and their -nocheck variants use will almost certainly lead to bugs in your code, if not -now, then in the future. You are strongly discouraged from using these in new -code, and you should convert old code to using either the `*_posix` or -`*_modern` functions if possible.** +**Warning: The year value interpretation that these functions and their nocheck +variants use will almost certainly lead to bugs in your code, if not now, then +in the future. You are strongly discouraged from using these in new code, and +you should convert old code to using either the `*_posix` or `*_modern` +functions if possible.** ## `timelocal_nocheck()` and `timegm_nocheck()` @@ -93,8 +97,8 @@ variants, `timelocal_nocheck()` and `timegm_nocheck()`. These variants must be explicitly imported. -If you supply data which is not valid (month 27, second 1,000) the results -will be unpredictable (so don't do that). +If you supply data which is not valid (month 27, second 1,000) the results will +be unpredictable (so don't do that). Note that my benchmarks show that this is just a 3% speed increase over the checked versions, so unless calling `Time::Local` is the hottest spot in your @@ -108,22 +112,21 @@ Strictly speaking, the year should be specified in a form consistent with `localtime()`, i.e. the offset from 1900. In order to make the interpretation -of the year easier for humans, however, who are more accustomed to seeing -years as two-digit or four-digit values, the following conventions are -followed: +of the year easier for humans, however, who are more accustomed to seeing years +as two-digit or four-digit values, the following conventions are followed: - Years greater than 999 are interpreted as being the actual year, rather than -the offset from 1900. Thus, 1964 would indicate the year Martin Luther King -won the Nobel prize, not the year 3864. +the offset from 1900. Thus, 1964 would indicate the year Martin Luther King won +the Nobel prize, not the year 3864. - Years in the range 100..999 are interpreted as offset from 1900, so that 112 indicates 2012. This rule also applies to years less than zero (but see note below regarding date range). - Years in the range 0..99 are interpreted as shorthand for years in the rolling -"current century," defined as 50 years on either side of the current -year. Thus, today, in 1999, 0 would refer to 2000, and 45 to 2045, but 55 -would refer to 1955. Twenty years from now, 55 would instead refer to -2055. This is messy, but matches the way people currently think about two -digit dates. Whenever possible, use an absolute four digit year instead. +"current century," defined as 50 years on either side of the current year. +Thus, today, in 1999, 0 would refer to 2000, and 45 to 2045, but 55 would refer +to 1955. Twenty years from now, 55 would instead refer to 2055. This is messy, +but matches the way people currently think about two digit dates. Whenever +possible, use an absolute four digit year instead. The scheme above allows interpretation of a wide range of dates, particularly if 4-digit years are used. But it also means that the behavior of your code @@ -152,15 +155,15 @@ "Europe/Paris" time zone, the local time of 2001-10-28 02:30:00 can represent either 2001-10-28 00:30:00 GMT, **or** 2001-10-28 01:30:00 GMT. -When given an ambiguous local time, the timelocal() function will always -return the epoch for the _earlier_ of the two possible GMT times. +When given an ambiguous local time, the timelocal() function will always return +the epoch for the _earlier_ of the two possible GMT times. ## Non-Existent Local Times (DST) -When a DST change causes a locale clock to skip one hour forward, there will -be an hour's worth of local times that don't exist. Again, for the -"Europe/Paris" time zone, the local clock jumped from 2001-03-25 01:59:59 to -2001-03-25 03:00:00. +When a DST change causes a locale clock to skip one hour forward, there will be +an hour's worth of local times that don't exist. Again, for the "Europe/Paris" +time zone, the local clock jumped from 2001-03-25 01:59:59 to 2001-03-25 +03:00:00. If the `timelocal()` function is given a non-existent local time, it will simply return an epoch value for the time one hour later. @@ -183,21 +186,20 @@ `localtime()` and `gmtime()`. We manage this by caching the start times of any months we've seen before. If we know the start time of the month, we can always calculate any time within the month. The start times are calculated -using a mathematical formula. Unlike other algorithms that do multiple calls -to `gmtime()`. +using a mathematical formula. Unlike other algorithms that do multiple calls to +`gmtime()`. -The `timelocal()` function is implemented using the same cache. We just -assume that we're translating a GMT time, and then fudge it when we're done -for the timezone and daylight savings arguments. Note that the timezone is -evaluated for each date because countries occasionally change their official -timezones. Assuming that `localtime()` corrects for these changes, this -routine will also be correct. +The `timelocal()` function is implemented using the same cache. We just assume +that we're translating a GMT time, and then fudge it when we're done for the +timezone and daylight savings arguments. Note that the timezone is evaluated +for each date because countries occasionally change their official timezones. +Assuming that `localtime()` corrects for these changes, this routine will also +be correct. # AUTHORS EMERITUS -This module is based on a Perl 4 library, timelocal.pl, that was -included with Perl 4.036, and was most likely written by Tom -Christiansen. +This module is based on a Perl 4 library, timelocal.pl, that was included with +Perl 4.036, and was most likely written by Tom Christiansen. The current version was written by Graham Barr. @@ -210,8 +212,6 @@ There is a mailing list available for users of this distribution, mailto:datetime@perl.org(mailto:datetime@perl.org). -I am also usually active on IRC as 'autarch' on `irc://irc.perl.org`. - # SOURCE The source code repository for Time-Local can be found at https://github.com/houseabsolute/Time-Local(https://github.com/houseabsolute/Time-Local). @@ -223,12 +223,14 @@ # CONTRIBUTORS - Florian Ragwitz <rafl@debian.org> +- Gregory Oschwald <oschwald@gmail.com> - J. Nick Koston <nick@cpanel.net> +- Tom Wyant <wyant@cpan.org> - Unknown <unknown@example.com> # COPYRIGHT AND LICENSE -This software is copyright (c) 1997 - 2020 by Graham Barr & Dave Rolsky. +This software is copyright (c) 1997 - 2023 by Graham Barr & Dave Rolsky.
View file
_service:tar_scm:Time-Local-1.30.tar.gz/azure-pipelines.yml -> _service:tar_scm:Time-Local-1.35.tar.gz/azure-pipelines.yml
Changed
@@ -3,7 +3,7 @@ - repository: ci-perl-helpers type: github name: houseabsolute/ci-perl-helpers - endpoint: houseabsolute/ci-perl-helpers + endpoint: houseabsolute stages: - template: templates/helpers/build.yml@ci-perl-helpers
View file
_service:tar_scm:Time-Local-1.30.tar.gz/cpanfile -> _service:tar_scm:Time-Local-1.35.tar.gz/cpanfile
Changed
@@ -1,3 +1,6 @@ +# This file is generated by Dist::Zilla::Plugin::CPANFile v6.030 +# Do not edit this file directly. To change prereqs, edit the `dist.ini` file. + requires "Carp" => "0"; requires "Exporter" => "0"; requires "constant" => "0"; @@ -20,22 +23,23 @@ }; on 'develop' => sub { - requires "Code::TidyAll" => "0.56"; - requires "Code::TidyAll::Plugin::SortLines::Naturally" => "0.000003"; - requires "Code::TidyAll::Plugin::Test::Vars" => "0.02"; + requires "Capture::Tiny" => "0"; + requires "Encode" => "0"; requires "File::Spec" => "0"; + requires "FindBin" => "0"; requires "IO::Handle" => "0"; requires "IPC::Open3" => "0"; requires "POSIX" => "0"; - requires "Parallel::ForkManager" => "1.19"; - requires "Perl::Critic" => "1.126"; - requires "Perl::Tidy" => "20160302"; + requires "Perl::Critic" => "1.138"; + requires "Perl::Critic::Moose" => "1.05"; + requires "Perl::Tidy" => "20210111"; + requires "Pod::Checker" => "1.74"; requires "Pod::Coverage::TrustPod" => "0"; + requires "Pod::Tidy" => "0.10"; requires "Pod::Wordlist" => "0"; requires "Test::CPAN::Changes" => "0.19"; requires "Test::CPAN::Meta::JSON" => "0.16"; requires "Test::CleanNamespaces" => "0.15"; - requires "Test::Code::TidyAll" => "0.50"; requires "Test::EOL" => "0"; requires "Test::Mojibake" => "0"; requires "Test::More" => "0.96"; @@ -44,7 +48,6 @@ requires "Test::Pod::Coverage" => "1.08"; requires "Test::Portability::Files" => "0"; requires "Test::Spelling" => "0.12"; - requires "Test::Vars" => "0.009"; requires "Test::Version" => "2.05"; requires "perl" => "5.006"; requires "warnings" => "0";
View file
_service:tar_scm:Time-Local-1.35.tar.gz/dev-bin
Added
+(directory)
View file
_service:tar_scm:Time-Local-1.35.tar.gz/dev-bin/install-xt-tools.sh
Added
@@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +TARGET="$HOME/bin" +if $(id -u) -eq 0 ; then + TARGET="/usr/local/bin" +fi +echo "Installing dev tools to $TARGET" + +mkdir -p $TARGET +curl --silent --location \ + https://raw.githubusercontent.com/houseabsolute/ubi/master/bootstrap/bootstrap-ubi.sh | + sh + +"$TARGET/ubi" --project houseabsolute/precious --in "$TARGET" +"$TARGET/ubi" --project houseabsolute/omegasort --in "$TARGET" + +echo "Add $TARGET to your PATH in order to use precious for linting and tidying"
View file
_service:tar_scm:Time-Local-1.30.tar.gz/dist.ini -> _service:tar_scm:Time-Local-1.35.tar.gz/dist.ini
Changed
@@ -4,6 +4,7 @@ copyright_holder = Graham Barr & Dave Rolsky copyright_year = 1997 +; authordep Dist::Zilla::PluginBundle::DROLSKY = 1.22 @DROLSKY dist = Time-Local stopwords = Christiansen
View file
_service:tar_scm:Time-Local-1.35.tar.gz/git
Added
+(directory)
View file
_service:tar_scm:Time-Local-1.35.tar.gz/git/hooks
Added
+(directory)
View file
_service:tar_scm:Time-Local-1.35.tar.gz/git/hooks/pre-commit.sh
Added
@@ -0,0 +1,15 @@ +#!/bin/bash + +status=0 + +PRECIOUS=$(which precious) +if -z $PRECIOUS ; then + PRECIOUS=./bin/precious +fi + +"$PRECIOUS" lint -s +if (( $? != 0 )); then + status+=1 +fi + +exit $status
View file
_service:tar_scm:Time-Local-1.35.tar.gz/git/setup.pl
Added
@@ -0,0 +1,27 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +use Cwd qw( abs_path ); + +symlink_hook('pre-commit'); + +sub symlink_hook { + my $hook = shift; + + my $dot = ".git/hooks/$hook"; + my $file = "git/hooks/$hook.sh"; + my $link = "../../$file"; + + if ( -e $dot ) { + if ( -l $dot ) { + return if readlink $dot eq $link; + } + warn "You already have a hook at $dot!\n"; + return; + } + + symlink $link, $dot + or die "Could not link $dot => $link: $!"; +}
View file
_service:tar_scm:Time-Local-1.35.tar.gz/lib
Added
+(directory)
View file
_service:tar_scm:Time-Local-1.30.tar.gz/lib/Time/Local.pm -> _service:tar_scm:Time-Local-1.35.tar.gz/lib/Time/Local.pm
Changed
@@ -5,7 +5,7 @@ use Carp (); use Exporter; -our $VERSION = '1.30'; +our $VERSION = '1.35'; use parent 'Exporter'; @@ -58,6 +58,18 @@ else { # recent localtime()'s limit is the year 2**31 $MaxDay = 365 * ( 2**31 ); + + # On (some?) 32-bit platforms this overflows and we end up with a negative + # $MaxDay, which totally breaks this module. This is the old calculation + # we used from the days before Perl always had 64-bit time_t. + if ( $MaxDay < 0 ) { + require Config; + ## no critic (Variables::ProhibitPackageVars) + my $max_int + = ( ( 1 << ( 8 * $Config::Config{intsize} - 2 ) ) - 1 ) * 2 + 1; + $MaxDay + = int( ( $max_int - ( SECS_PER_DAY / 2 ) ) / SECS_PER_DAY ) - 1; + } } # Determine the EPOC day for this machine @@ -80,7 +92,7 @@ $Epoc = _daygm( gmtime(0) ); } -%Cheat = (); # clear the cache as epoc has changed +%Cheat = (); # clear the cache as epoc has changed sub _daygm { @@ -95,7 +107,8 @@ + int( $year / 4 ) - int( $year / 100 ) + int( $year / 400 ) - + int( ( ( $month * 306 ) + 5 ) / 10 ) ) - $Epoc; + + int( ( ( $month * 306 ) + 5 ) / 10 ) ) + - $Epoc; } ); } @@ -111,6 +124,8 @@ sub timegm { my ( $sec, $min, $hour, $mday, $month, $year ) = @_; + my $subsec = $sec - int($sec); + $sec = int($sec); if ( $Options{no_year_munging} ) { $year -= 1900; @@ -145,9 +160,8 @@ my $days = _daygm( undef, undef, undef, $mday, $month, $year ); - unless ( $Options{no_range_check} or abs($days) < $MaxDay ) { - my $msg = q{}; - $msg .= "Day too big - $days > $MaxDay\n" if $days > $MaxDay; + if ( abs($days) > $MaxDay && !$Options{no_range_check} ) { + my $msg = "Day too big - abs($days) > $MaxDay\n"; $year += 1900; $msg @@ -156,11 +170,16 @@ Carp::croak($msg); } - return - $sec + $SecOff - + ( SECS_PER_MINUTE * $min ) - + ( SECS_PER_HOUR * $hour ) - + ( SECS_PER_DAY * $days ); + # Adding in the $subsec value last seems to prevent floating point errors + # from creeping in. + return ( + ( + $sec + $SecOff + + ( SECS_PER_MINUTE * $min ) + + ( SECS_PER_HOUR * $hour ) + + ( SECS_PER_DAY * $days ) + ) + $subsec + ); } sub _is_leap_year { @@ -187,11 +206,16 @@ } sub timelocal { + my $sec = shift; + my $subsec = $sec - int($sec); + $sec = int($sec); + unshift @_, $sec; + my $ref_t = &timegm; my $loc_for_ref_t = _timegm( localtime($ref_t) ); my $zone_off = $loc_for_ref_t - $ref_t - or return $loc_for_ref_t; + or return $loc_for_ref_t + $subsec; # Adjust for timezone my $loc_t = $ref_t - $zone_off; @@ -207,20 +231,20 @@ && ( ( $ref_t - SECS_PER_HOUR ) - _timegm( localtime( $loc_t - SECS_PER_HOUR ) ) < 0 ) ) { - return $loc_t - SECS_PER_HOUR; + return ( $loc_t - SECS_PER_HOUR ) + $subsec; } # Adjust for DST change $loc_t += $dst_off; - return $loc_t if $dst_off > 0; + return $loc_t + $subsec if $dst_off > 0; # If the original date was a non-existent gap in a forward DST jump, we # should now have the wrong answer - undo the DST adjustment my ( $s, $m, $h ) = localtime($loc_t); $loc_t -= $dst_off if $s != $_0 || $m != $_1 || $h != $_2; - return $loc_t; + return $loc_t + $subsec; } sub timelocal_nocheck { @@ -254,7 +278,7 @@ =head1 VERSION -version 1.30 +version 1.35 =head1 SYNOPSIS @@ -281,6 +305,8 @@ =head2 C<timelocal_posix()> and C<timegm_posix()> +I<Since version 1.30.> + These functions are the exact inverse of Perl's built-in C<localtime> and C<gmtime> functions. That means that calling C<< timelocal_posix( localtime($value) ) >> will always give you the same C<$value> you started @@ -293,9 +319,9 @@ These functions expect the year value to be the number of years since 1900, which is what the C<localtime()> and C<gmtime()> built-ins returns. -They perform range checking by default on the input C<$sec>, C<$min>, -C<$hour>, C<$mday>, and C<$mon> values and will croak (using C<Carp::croak()>) -if given a value outside the allowed ranges. +They perform range checking by default on the input C<$sec>, C<$min>, C<$hour>, +C<$mday>, and C<$mon> values and will croak (using C<Carp::croak()>) if given a +value outside the allowed ranges. While it would be nice to make this the default behavior, that would almost certainly break a lot of code, so you must explicitly import these functions @@ -307,6 +333,8 @@ =head2 C<timelocal_modern()> and C<timegm_modern()> +I<Since version 1.27.> + When C<Time::Local> was first written, it was a common practice to represent years as a two-digit value like C<99> for C<1999> or C<1> for C<2001>. This caused all sorts of problems (google "Y2K problem" if you're very young) and @@ -316,26 +344,26 @@ calculation when given a year value less than 1000. This leads to surprising results in many cases. See L</Year Value Interpretation> for details. -The C<time*_modern()> functions do not do this year munging and simply take -the year value as provided. +The C<time*_modern()> functions do not do this year munging and simply take the +year value as provided. -They perform range checking by default on the input C<$sec>, C<$min>, -C<$hour>, C<$mday>, and C<$mon> values and will croak (using C<Carp::croak()>) -if given a value outside the allowed ranges. +They perform range checking by default on the input C<$sec>, C<$min>, C<$hour>, +C<$mday>, and C<$mon> values and will croak (using C<Carp::croak()>) if given a +value outside the allowed ranges. =head2 C<timelocal()> and C<timegm()> This module exports two functions by default, C<timelocal()> and C<timegm()>. -They perform range checking by default on the input C<$sec>, C<$min>, -C<$hour>, C<$mday>, and C<$mon> values and will croak (using C<Carp::croak()>) -if given a value outside the allowed ranges. +They perform range checking by default on the input C<$sec>, C<$min>, C<$hour>, +C<$mday>, and C<$mon> values and will croak (using C<Carp::croak()>) if given a +value outside the allowed ranges. -B<Warning: The year value interpretation that these functions and their
View file
_service:tar_scm:Time-Local-1.30.tar.gz/perlcriticrc -> _service:tar_scm:Time-Local-1.35.tar.gz/perlcriticrc
Changed
@@ -1,6 +1,6 @@ severity = 3 verbose = 11 -theme = core + pbp + bugs + maintenance + cosmetic + complexity + security + tests + moose +theme = (core && (pbp || bugs || maintenance || cosmetic || complexity || security || tests)) || moose program-extensions = pl psgi t exclude = Subroutines::ProhibitCallsToUndeclaredSubs
View file
_service:tar_scm:Time-Local-1.35.tar.gz/precious.toml
Added
@@ -0,0 +1,51 @@ +exclude = + ".build/**/*", + "Time-Local-*/**/*", + "blib/**/*", + "t/00-*", + "t/author-*", + "t/release-*", + "t/zzz-*", + "xt/**/*", + + +commands.omegasort-gitignore +type = "both" +include = "**/.gitignore" +cmd = "omegasort", "--sort=path" +lint_flags = "--check" +tidy_flags = "--in-place" +ok_exit_codes = 0 +lint_failure_exit_codes = 1 + +commands.perlcritic +type = "lint" +include = "**/*.{pl,pm,t,psgi}" +cmd = "perlcritic", "--profile=$PRECIOUS_ROOT/perlcriticrc" +ok_exit_codes = 0 +lint_failure_exit_codes = 2 + +commands.perltidy +type = "both" +include = "**/*.{pl,pm,t,psgi}" +cmd = "perltidy", "--profile=$PRECIOUS_ROOT/perltidyrc" +lint_flags = "--assert-tidy", "--no-standard-output", "--outfile=/dev/null" +tidy_flags = "--backup-and-modify-in-place", "--backup-file-extension=/" +ok_exit_codes = 0 +lint_failure_exit_codes = 2 +ignore_stderr = "Begin Error Output Stream" + +commands.podchecker +type = "lint" +include = "**/*.{pl,pm,pod}" +cmd = "podchecker", "--warnings", "--warnings" +ok_exit_codes = 0, 2 +lint_failure_exit_codes = 1 +ignore_stderr = ".+ pod syntax OK", ".+ does not contain any pod commands" + +commands.podtidy +type = "tidy" +include = "**/*.{pl,pm,pod}" +cmd = "podtidy", "--columns", "80", "--inplace", "--nobackup" +ok_exit_codes = 0 +lint_failure_exit_codes = 1
View file
_service:tar_scm:Time-Local-1.30.tar.gz/t/00-report-prereqs.dd -> _service:tar_scm:Time-Local-1.35.tar.gz/t/00-report-prereqs.dd
Changed
@@ -6,22 +6,23 @@ }, 'develop' => { 'requires' => { - 'Code::TidyAll' => '0.56', - 'Code::TidyAll::Plugin::SortLines::Naturally' => '0.000003', - 'Code::TidyAll::Plugin::Test::Vars' => '0.02', + 'Capture::Tiny' => '0', + 'Encode' => '0', 'File::Spec' => '0', + 'FindBin' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'POSIX' => '0', - 'Parallel::ForkManager' => '1.19', - 'Perl::Critic' => '1.126', - 'Perl::Tidy' => '20160302', + 'Perl::Critic' => '1.138', + 'Perl::Critic::Moose' => '1.05', + 'Perl::Tidy' => '20210111', + 'Pod::Checker' => '1.74', 'Pod::Coverage::TrustPod' => '0', + 'Pod::Tidy' => '0.10', 'Pod::Wordlist' => '0', 'Test::CPAN::Changes' => '0.19', 'Test::CPAN::Meta::JSON' => '0.16', 'Test::CleanNamespaces' => '0.15', - 'Test::Code::TidyAll' => '0.50', 'Test::EOL' => '0', 'Test::Mojibake' => '0', 'Test::More' => '0.96', @@ -30,7 +31,6 @@ 'Test::Pod::Coverage' => '1.08', 'Test::Portability::Files' => '0', 'Test::Spelling' => '0.12', - 'Test::Vars' => '0.009', 'Test::Version' => '2.05', 'perl' => '5.006', 'warnings' => '0'
View file
_service:tar_scm:Time-Local-1.30.tar.gz/t/00-report-prereqs.t -> _service:tar_scm:Time-Local-1.35.tar.gz/t/00-report-prereqs.t
Changed
@@ -3,7 +3,7 @@ use strict; use warnings; -# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027 +# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.029 use Test::More tests => 1; @@ -109,20 +109,24 @@ my @reports = qw/Module Want Have/; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { - next if $mod eq 'perl'; next if grep { $_ eq $mod } @exclude; - my $file = $mod; - $file =~ s{::}{/}g; - $file .= ".pm"; - my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; - my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; + 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; @@ -188,6 +192,6 @@ ); } -pass; +pass('Reported prereqs'); # vim: ts=4 sts=4 sw=4 et:
View file
_service:tar_scm:Time-Local-1.30.tar.gz/t/Local.t -> _service:tar_scm:Time-Local-1.35.tar.gz/t/Local.t
Changed
@@ -36,7 +36,8 @@ my $neg_epoch_ok = $^O eq 'VMS' ? 0 : defined( ( localtime(-259200) )0 ) ? 1 : 0; -my $large_epoch_ok = eval { ( gmtime 2**40 )5 == 34912 }; +# On some old 32-bit Perls the call to gmtime here may return an undef. +my $large_epoch_ok = eval { ( ( gmtime 2**40 )5 || 0 ) == 34912 }; subtest( 'valid times', \&_test_valid_times ); subtest( 'diff between two calls', \&_test_diff_between_two_calls ); @@ -49,6 +50,7 @@ subtest( 'large epoch values', \&_test_large_epoch_values ); subtest( '2-digit years', \&_test_2_digit_years ); subtest( 'invalid values', \&_test_invalid_values ); +subtest( 'non-integer seconds', \&_test_non_integer_seconds ); sub _test_valid_times { my %tests = ( @@ -172,19 +174,22 @@ my $year = 1990; $year -= 1900 if $sub =~ /posix/; my $sub_ref = __PACKAGE__->can($sub); - is( - $sub_ref->( 0, 0, 1, 1, 0, $year ) - - $sub_ref->( 0, 0, 0, 1, 0, $year ), - 3600, - 'one hour difference between two calls' - ); - is( - $sub_ref->( 1, 2, 3, 1, 0, $year + 1 ) - - $sub_ref->( 1, 2, 3, 31, 11, $year ), - 24 * 3600, - 'one day difference between two calls across year boundary', - ); + for my $sec ( 0, 0.1 ) { + is( + $sub_ref->( $sec, 0, 1, 1, 0, $year ) + - $sub_ref->( $sec, 0, 0, 1, 0, $year ), + 3600, + 'one hour difference between two calls' + ); + + is( + $sub_ref->( $sec, 2, 3, 1, 0, $year + 1 ) + - $sub_ref->( $sec, 2, 3, 31, 11, $year ), + 24 * 3600, + 'one day difference between two calls across year boundary', + ); + } }, ); } @@ -197,13 +202,16 @@ $year -= 1900 if $sub =~ /posix/; my $sub_ref = __PACKAGE__->can($sub); - # Diff beween Jan 1, 1980 and Mar 1, 1980 = (31 + 29 = 60 days) - is( - $sub_ref->( 0, 0, 0, 1, 2, 80 ) - - $sub_ref->( 0, 0, 0, 1, 0, 80 ), - 60 * 24 * 3600, - '60 day difference between two calls', - ); + for my $sec ( 0, 0.1 ) { + + # Diff beween Jan 1, 1980 and Mar 1, 1980 = (31 + 29 = 60 days) + is( + $sub_ref->( $sec, 0, 0, 1, 2, $year ) + - $sub_ref->( $sec, 0, 0, 1, 0, $year ), + 60 * 24 * 3600, + '60 day difference between two calls', + ); + } }, ); } @@ -228,7 +236,8 @@ # testers in US/Pacific should get 3, # other testers should get 2 - ok( $hour == 2 || $hour == 3, 'hour should be 2 or 3' ); + ok( $hour == 2 || $hour == 3, 'hour should be 2 or 3' ) + or diag "hour = $hour"; }, ); } @@ -391,7 +400,8 @@ timelocal_modern( 0, 0, 0, 1, 1, $pre_break ) ) )5 - ) + 1900, + ) + + 1900, $pre_break, "year $pre_break is treated as year $pre_break", ); @@ -402,7 +412,8 @@ timelocal_modern( 0, 0, 0, 1, 1, $break ) ) )5 - ) + 1900, + ) + + 1900, $break, "year $break is treated as year $break", ); @@ -413,7 +424,8 @@ timelocal_modern( 0, 0, 0, 1, 1, $post_break ) ) )5 - ) + 1900, + ) + + 1900, $post_break, "year $post_break is treated as year $post_break", ); @@ -476,4 +488,59 @@ } } +sub _test_non_integer_seconds { + my @epochs = ( 0, 1636484894 ); + push @epochs, -1636484894 if $neg_epoch_ok; + + # We want to get a lot of different values to smoke out floating point + # issues. + for my $i ( 1 .. 30 ) { + push @epochs, $i * 11; + push @epochs, $i * 11 * -1 if $neg_epoch_ok; + } + + for my $epoch (@epochs) { + subtest( + "epoch = $epoch", + sub { + subtest( + 'localtime', + sub { + my @lt = localtime($epoch); + my $orig_sec = $lt0; + + for my $i ( 1 .. 99 ) { + my $subsec = $i / 100; + $lt0 = $orig_sec + $subsec; + my $time = timelocal_posix( @lt 0 .. 5 ); + is( + $time, $epoch + $subsec, + "non-integer second of $subsec" + ); + } + } + ); + + subtest( + 'gmtime', + sub { + my @gt = ( gmtime($epoch) ) 0 .. 5 ; + my $orig_sec = $gt0; + + for my $i ( 1 .. 99 ) { + my $subsec = $i / 100; + $gt0 = $orig_sec + $subsec; + my $time = timegm_posix(@gt); + is( + $time, $epoch + $subsec, + "non-integer second of $subsec" + ); + } + } + ); + } + ); + } +} + done_testing();
View file
_service:tar_scm:Time-Local-1.35.tar.gz/xt
Added
+(directory)
View file
_service:tar_scm:Time-Local-1.30.tar.gz/xt/author/pod-spell.t -> _service:tar_scm:Time-Local-1.35.tar.gz/xt/author/pod-spell.t
Changed
@@ -17,20 +17,26 @@ Dave Florian Graham +Gregory Koston Local Nick +Oschwald PayPal Ragwitz Rolsky Rolsky's Time +Tom Unknown +Wyant autarch drolsky google lib nick nocheck +oschwald rafl unknown +wyant
View file
_service:tar_scm:Time-Local-1.30.tar.gz/xt/author/portability.t -> _service:tar_scm:Time-Local-1.35.tar.gz/xt/author/portability.t
Changed
@@ -3,8 +3,6 @@ use Test::More; -eval 'use Test::Portability::Files'; -plan skip_all => 'Test::Portability::Files required for testing portability' - if $@; +use Test::Portability::Files; run_tests();
View file
_service:tar_scm:Time-Local-1.35.tar.gz/xt/author/precious.t
Added
@@ -0,0 +1,24 @@ +use strict; +use warnings; + +use Test::More; + +use Capture::Tiny qw( capture ); +use Encode qw( decode ); +use FindBin qw( $Bin ); + +binmode $_, ':encoding(utf-8)' + for map { Test::More->builder->$_ } + qw( output failure_output todo_output ); + +chdir "$Bin/../.." + or die "Cannot chdir to $Bin/../..: $!"; + +my ( $out, $err ) = capture { system(qw( precious lint -a )) }; +$_ = decode( 'UTF-8', $_ ) for grep {defined} $out, $err; + +is( $? >> 8, 0, 'precious lint -a exited with 0' ) + or diag($out); +is( $err, q{}, 'no output to stderr' ); + +done_testing();
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2