Projects
openEuler:Mainline
perl-perlfaq
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 9
View file
_service:tar_scm:perl-perlfaq.spec
Changed
@@ -1,7 +1,7 @@ %global perl_package_name perlfaq Name: perl-perlfaq -Version: 5.20210520 -Release: 2 +Version: 5.20230701 +Release: 1 Summary: Frequently asked questions about Perl License: (GPL+ or Artistic) and Public Domain URL: https://metacpan.org/release/perlfaq @@ -46,6 +46,9 @@ %{_mandir}/man3/* %changelog +* Tue Jul 18 2023 renhongxun <renhongxun@h-partners.com> - 5.20230701-1 +- upgrade version to 5.20230701 + * Tue Oct 25 2022 renhongxun <renhongxun@h-partners.com> - 5.20210520-2 - Rebuild for next release
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/Changes -> _service:tar_scm:perlfaq-5.20230701.tar.gz/Changes
Changed
@@ -1,5 +1,10 @@ Revision history for perlfaq +5.20230701 2023-07-01 00:23:37Z + * Fix Unicode code point range in glossary (Felipe Gasper, #98) + * faq4: recommend fc() for string sorting, rather than lc() (brian d foy, + #102) + 5.20210520 2021-05-20 04:16:03Z * faq5: remove suggestion to use read() for slurping (PR#96, Dan Book)
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/LICENSE -> _service:tar_scm:perlfaq-5.20230701.tar.gz/LICENSE
Changed
@@ -1,4 +1,4 @@ -This software is copyright (c) 2021 by Tom Christiansen, Nathan Torkington, and others. +This software is copyright (c) 2023 by Tom Christiansen, Nathan Torkington, and others. 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) 2021 by Tom Christiansen, Nathan Torkington, and others. +This software is Copyright (c) 2023 by Tom Christiansen, Nathan Torkington, and others. This is free software, licensed under: @@ -270,110 +270,143 @@ That's all there is to it! ---- The Artistic License 1.0 --- +--- The Perl Artistic License 1.0 --- -This software is Copyright (c) 2021 by Tom Christiansen, Nathan Torkington, and others. +This software is Copyright (c) 2023 by Tom Christiansen, Nathan Torkington, and others. This is free software, licensed under: - The Artistic License 1.0 + 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. + + + The "Artistic License" + + Preamble + +The intent of this document is to state the conditions under which a +Package may be copied, such that the Copyright Holder maintains some +semblance of artistic control over the development of the package, +while giving the users of the package the right to use and distribute +the Package in a more-or-less customary fashion, plus the right to make +reasonable modifications. Definitions: - - "Package" refers to the collection of files distributed by the Copyright - Holder, and derivatives of that collection of files created through - textual modification. - - "Standard Version" refers to such a Package if it has not been modified, - or has been modified in accordance with the wishes of the Copyright - Holder. - - "Copyright Holder" is whoever is named in the copyright or copyrights for - the package. - - "You" is you, if you're thinking about copying or distributing this Package. - - "Reasonable copying fee" is whatever you can justify on the basis of media - cost, duplication charges, time of people involved, and so on. (You will - not be required to justify it to the Copyright Holder, but only to the - computing community at large as a market that must bear the fee.) - - "Freely Available" means that no fee is charged for the item itself, though - there may be fees involved in handling the item. It also means that - recipients of the item may redistribute it under the same conditions they - received it. + "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. +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: +3. You may otherwise modify your copy of this Package in any way, provided +that you insert a prominent notice in each changed file stating how and +when you changed that file, and provided that you do at least ONE of the +following: - a) place your modifications in the Public Domain or otherwise make them - Freely Available, such as by posting said modifications to Usenet or an - equivalent medium, or placing the modifications on a major archive site - such as ftp.uu.net, or by allowing the Copyright Holder to include your - modifications in the Standard Version of the Package. + 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. + 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. + 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. + 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: +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. + 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. + b) accompany the distribution with the machine-readable source of + the Package with your modifications. - c) accompany any non-standard executables with their corresponding Standard - Version executables, giving the non-standard executables non-standard - names, and clearly documenting the differences in manual pages (or - equivalent), together with instructions on where to get the Standard - Version. + 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. + d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this -Package. You may charge any fee you choose for support of this Package. You -may not charge a fee for this Package itself. However, you may distribute this -Package in aggregate with other (possibly commercial) programs as part of a -larger (possibly commercial) software distribution provided that you do not -advertise this Package as a product of your own. - -6. The scripts and library files supplied as input to or produced as output -from the programs of this Package do not automatically fall under the copyright -of this Package, but belong to whomever generated them, and may be sold -commercially, and may be aggregated with this Package. - -7. C or perl subroutines supplied by you and linked into this Package shall not -be considered part of this Package. - -8. The name of the Copyright Holder may not be used to endorse or promote +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
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/MANIFEST -> _service:tar_scm:perlfaq-5.20230701.tar.gz/MANIFEST
Changed
@@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.018. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.030. Changes LICENSE MANIFEST
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/META.json -> _service:tar_scm:perlfaq-5.20230701.tar.gz/META.json
Changed
@@ -9,7 +9,7 @@ "The Perl 5 Porters <perl5-porters@perl.org>" , "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 6.018, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010", "license" : "perl_5" , @@ -75,36 +75,36 @@ }, "x_IRC" : "irc://irc.perl.org/#perl-faq" }, - "version" : "5.20210520", + "version" : "5.20230701", "x_Dist_Zilla" : { "perl" : { - "version" : "5.033009" + "version" : "5.037011" }, "plugins" : { "class" : "Dist::Zilla::Plugin::AutoVersion", "name" : "AutoVersion", - "version" : "6.018" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "MetaYAML", - "version" : "6.018" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "MetaJSON", - "version" : "6.018" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "License", - "version" : "6.018" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "Readme", - "version" : "6.018" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", @@ -114,22 +114,22 @@ } }, "name" : "MakeMaker", - "version" : "6.018" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "Manifest", - "version" : "6.018" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "TestRelease", - "version" : "6.018" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "UploadToCPAN", - "version" : "6.018" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", @@ -151,7 +151,7 @@ } }, "name" : "Git::GatherDir", - "version" : "2.047" + "version" : "2.048" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", @@ -171,7 +171,7 @@ "eumm_bundled" : 0 }, "Dist::Zilla::Role::ModuleMetadata" : { - "Module::Metadata" : "1.000037", + "Module::Metadata" : "1.000038", "version" : "0.006" } }, @@ -181,7 +181,7 @@ { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "MetaConfig", - "version" : "6.018" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", @@ -214,7 +214,7 @@ { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "PodSyntaxTests", - "version" : "6.018" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", @@ -265,7 +265,7 @@ } }, "name" : "Test::Portability", - "version" : "2.001000" + "version" : "2.001001" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", @@ -280,13 +280,13 @@ { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "MetaResources", - "version" : "6.018" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { - "git_version" : "2.31.1", + "git_version" : "2.40.0", "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", @@ -304,7 +304,7 @@ { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "MetaNoIndex", - "version" : "6.018" + "version" : "6.030" }, { "class" : "inc::CreateQuestionList", @@ -314,12 +314,12 @@ { "class" : "Dist::Zilla::Plugin::FileFinder::Filter", "name" : "PodFiles", - "version" : "6.018" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::PodVersion", "name" : "PodVersion", - "version" : "6.018" + "version" : "6.030" }, { "class" : "Dist::Zilla::Plugin::Git::Check", @@ -333,18 +333,18 @@ "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { - "git_version" : "2.31.1", + "git_version" : "2.40.0", "repo_root" : "." } }, "name" : "Git::Check", - "version" : "2.047" + "version" : "2.048" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", "config" : { "Dist::Zilla::Role::Git::Repo" : { - "git_version" : "2.31.1", + "git_version" : "2.40.0", "repo_root" : "." } }, @@ -355,7 +355,7 @@ "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "config" : { "Dist::Zilla::Role::Git::Repo" : { - "git_version" : "2.31.1", + "git_version" : "2.40.0", "repo_root" : "." } }, @@ -389,7 +389,7 @@ } }, "name" : "@Git::VersionManager/pluginbundle version",
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/META.yml -> _service:tar_scm:perlfaq-5.20230701.tar.gz/META.yml
Changed
@@ -17,7 +17,7 @@ ExtUtils::MakeMaker: '0' perl: '5.006' dynamic_config: 0 -generated_by: 'Dist::Zilla version 6.018, 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 @@ -33,50 +33,50 @@ bugtracker: https://github.com/perl-doc-cats/perlfaq/issues homepage: https://metacpan.org/release/perlfaq repository: https://github.com/perl-doc-cats/perlfaq.git -version: '5.20210520' +version: '5.20230701' x_Dist_Zilla: perl: - version: '5.033009' + version: '5.037011' plugins: - class: Dist::Zilla::Plugin::AutoVersion name: AutoVersion - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::MetaYAML name: MetaYAML - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::MetaJSON name: MetaJSON - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::License name: License - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::Readme name: Readme - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: '6' name: MakeMaker - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::Manifest name: Manifest - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::TestRelease name: TestRelease - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::UploadToCPAN name: UploadToCPAN - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::Git::GatherDir config: @@ -93,7 +93,7 @@ Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: Git::GatherDir - version: '2.047' + version: '2.048' - class: Dist::Zilla::Plugin::RunExtraTests config: @@ -108,14 +108,14 @@ entered_core: '5.015000' eumm_bundled: 0 Dist::Zilla::Role::ModuleMetadata: - Module::Metadata: '1.000037' + Module::Metadata: '1.000038' version: '0.006' name: DualLife version: '0.07' - class: Dist::Zilla::Plugin::MetaConfig name: MetaConfig - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::MinimumPerl name: MinimumPerl @@ -124,7 +124,7 @@ class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: - bail_out_on_fail: '0' + bail_out_on_fail: 0 fail_on_warning: author fake_home: 0 filename: t/00-compile.t @@ -141,7 +141,7 @@ - class: Dist::Zilla::Plugin::PodSyntaxTests name: PodSyntaxTests - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::Test::NoTabs config: @@ -179,7 +179,7 @@ Dist::Zilla::Plugin::Test::Portability: options: '' name: Test::Portability - version: '2.001000' + version: '2.001001' - class: Dist::Zilla::Plugin::Test::MinimumVersion config: @@ -190,12 +190,12 @@ - class: Dist::Zilla::Plugin::MetaResources name: MetaResources - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: - git_version: 2.31.1 + git_version: 2.40.0 include_authors: 0 include_releaser: 1 order_by: name @@ -209,7 +209,7 @@ - class: Dist::Zilla::Plugin::MetaNoIndex name: MetaNoIndex - version: '6.018' + version: '6.030' - class: inc::CreateQuestionList name: =inc::CreateQuestionList @@ -217,11 +217,11 @@ - class: Dist::Zilla::Plugin::FileFinder::Filter name: PodFiles - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::PodVersion name: PodVersion - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::Git::Check config: @@ -232,15 +232,15 @@ allow_dirty_match: changelog: Changes Dist::Zilla::Role::Git::Repo: - git_version: 2.31.1 + git_version: 2.40.0 repo_root: . name: Git::Check - version: '2.047' + version: '2.048' - class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts config: Dist::Zilla::Role::Git::Repo: - git_version: 2.31.1 + git_version: 2.40.0 repo_root: . name: Git::CheckFor::MergeConflicts version: '0.014' @@ -248,7 +248,7 @@ class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch config: Dist::Zilla::Role::Git::Repo: - git_version: 2.31.1 + git_version: 2.40.0 repo_root: . name: Git::CheckFor::CorrectBranch version: '0.014' @@ -272,7 +272,7 @@ phase: develop type: recommends name: '@Git::VersionManager/pluginbundle version' - version: '6.018' + version: '6.030' - class: Dist::Zilla::Plugin::RewriteVersion::Transitional config: @@ -313,12 +313,12 @@
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/Makefile.PL -> _service:tar_scm:perlfaq-5.20230701.tar.gz/Makefile.PL
Changed
@@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.018. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.030. use strict; use warnings; @@ -23,7 +23,7 @@ "IPC::Open3" => 0, "Test::More" => 0 }, - "VERSION" => "5.20210520", + "VERSION" => "5.20230701", "test" => { "TESTS" => "t/*.t" }
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/README -> _service:tar_scm:perlfaq-5.20230701.tar.gz/README
Changed
@@ -1,12 +1,12 @@ This archive contains the distribution perlfaq, -version 5.20210520: +version 5.20230701: Frequently asked questions about Perl -This software is copyright (c) 2021 by Tom Christiansen, Nathan Torkington, and others. +This software is copyright (c) 2023 by Tom Christiansen, Nathan Torkington, and others. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. -This README file was generated by Dist::Zilla::Plugin::Readme v6.018. +This README file was generated by Dist::Zilla::Plugin::Readme v6.030.
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/lib/perlfaq.pm -> _service:tar_scm:perlfaq-5.20230701.tar.gz/lib/perlfaq.pm
Changed
@@ -2,6 +2,6 @@ use warnings; package perlfaq; -our $VERSION = '5.20210520'; +our $VERSION = '5.20230701'; 1;
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/lib/perlfaq.pod -> _service:tar_scm:perlfaq-5.20230701.tar.gz/lib/perlfaq.pod
Changed
@@ -4,7 +4,7 @@ =head1 VERSION -version 5.20210520 +version 5.20230701 =head1 DESCRIPTION
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/lib/perlfaq1.pod -> _service:tar_scm:perlfaq-5.20230701.tar.gz/lib/perlfaq1.pod
Changed
@@ -4,7 +4,7 @@ =head1 VERSION -version 5.20210520 +version 5.20230701 =head1 DESCRIPTION
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/lib/perlfaq2.pod -> _service:tar_scm:perlfaq-5.20230701.tar.gz/lib/perlfaq2.pod
Changed
@@ -4,7 +4,7 @@ =head1 VERSION -version 5.20210520 +version 5.20230701 =head1 DESCRIPTION
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/lib/perlfaq3.pod -> _service:tar_scm:perlfaq-5.20230701.tar.gz/lib/perlfaq3.pod
Changed
@@ -4,7 +4,7 @@ =head1 VERSION -version 5.20210520 +version 5.20230701 =head1 DESCRIPTION
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/lib/perlfaq4.pod -> _service:tar_scm:perlfaq-5.20230701.tar.gz/lib/perlfaq4.pod
Changed
@@ -4,7 +4,7 @@ =head1 VERSION -version 5.20210520 +version 5.20230701 =head1 DESCRIPTION @@ -2201,10 +2201,9 @@ (contributed by brian d foy) To sort a hash, start with the keys. In this example, we give the list of -keys to the sort function which then compares them ASCIIbetically (which -might be affected by your locale settings). The output list has the keys -in ASCIIbetical order. Once we have the keys, we can go through them to -create a report which lists the keys in ASCIIbetical order. +keys to the sort function which then compares them as strings. The output list +has the keys in string order. Once we have the keys, we can go through them to +create a report which lists the keys in string order: my @keys = sort { $a cmp $b } keys %hash; @@ -2217,9 +2216,15 @@ value as the comparison. For instance, to make our report order case-insensitive, we use -C<lc> to lowercase the keys before comparing them: +C<fc> to safely lowercase the keys before comparing them: - my @keys = sort { lc $a cmp lc $b } keys %hash; + use v5.16; + my @keys = sort { fc($a) cmp fc($b) } keys %hash; + +Earlier versions of this answer used C<lc>, but that could give +unexpected results with some Unicode strings. See L<perlfunc/fc> +for the details. The Unicode::UCD module does the same thing for +earlier perls. Note: if the computation is expensive or the hash has many elements, you may want to look at the Schwartzian Transform to cache the @@ -2227,17 +2232,18 @@ If we want to sort by the hash value instead, we use the hash key to look it up. We still get out a list of keys, but this time they -are ordered by their value. +are ordered by their value: my @keys = sort { $hash{$a} <=> $hash{$b} } keys %hash; From there we can get more complex. If the hash values are the same, -we can provide a secondary sort on the hash key. +we can provide a secondary sort on the hash key: + use v5.16; my @keys = sort { $hash{$a} <=> $hash{$b} or - "\L$a" cmp "\L$b" + fc($a) cmp fc($b) } keys %hash; =head2 How can I always keep my hash sorted?
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/lib/perlfaq5.pod -> _service:tar_scm:perlfaq-5.20230701.tar.gz/lib/perlfaq5.pod
Changed
@@ -4,7 +4,7 @@ =head1 VERSION -version 5.20210520 +version 5.20230701 =head1 DESCRIPTION
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/lib/perlfaq6.pod -> _service:tar_scm:perlfaq-5.20230701.tar.gz/lib/perlfaq6.pod
Changed
@@ -4,7 +4,7 @@ =head1 VERSION -version 5.20210520 +version 5.20230701 =head1 DESCRIPTION
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/lib/perlfaq7.pod -> _service:tar_scm:perlfaq-5.20230701.tar.gz/lib/perlfaq7.pod
Changed
@@ -4,7 +4,7 @@ =head1 VERSION -version 5.20210520 +version 5.20230701 =head1 DESCRIPTION
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/lib/perlfaq8.pod -> _service:tar_scm:perlfaq-5.20230701.tar.gz/lib/perlfaq8.pod
Changed
@@ -4,7 +4,7 @@ =head1 VERSION -version 5.20210520 +version 5.20230701 =head1 DESCRIPTION
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/lib/perlfaq9.pod -> _service:tar_scm:perlfaq-5.20230701.tar.gz/lib/perlfaq9.pod
Changed
@@ -4,7 +4,7 @@ =head1 VERSION -version 5.20210520 +version 5.20230701 =head1 DESCRIPTION
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/lib/perlglossary.pod -> _service:tar_scm:perlfaq-5.20230701.tar.gz/lib/perlglossary.pod
Changed
@@ -7,7 +7,7 @@ =head1 VERSION -version 5.20210520 +version 5.20230701 =head1 DESCRIPTION @@ -604,7 +604,7 @@ The X<codepoints, about>integer a computer uses to represent a given character. ASCII codepoints are in the range 0 to 127; Unicode codepoints -are in the range 0 to 0x1F_FFFF; and Perl codepoints are in the range 0 to +are in the range 0 to 0x10_FFFF; and Perl codepoints are in the range 0 to 2³²−1 or 0 to 2⁶⁴−1, depending on your native integer size. In Perl Culture, sometimes called B<ordinals>.
View file
_service:tar_scm:perlfaq-5.20210520.tar.gz/xt/author/portability.t -> _service:tar_scm:perlfaq-5.20230701.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:perlfaq-5.20210520.tar.gz/xt/release/changes_has_content.t -> _service:tar_scm:perlfaq-5.20230701.tar.gz/xt/release/changes_has_content.t
Changed
@@ -2,7 +2,7 @@ note 'Checking Changes'; my $changes_file = 'Changes'; -my $newver = '5.20210520'; +my $newver = '5.20230701'; my $trial_token = '-TRIAL'; my $encoding = 'UTF-8';
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