Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-DateTime-Format-Flexible for 
openSUSE:Factory checked in at 2021-06-02 22:12:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-DateTime-Format-Flexible (Old)
 and      /work/SRC/openSUSE:Factory/.perl-DateTime-Format-Flexible.new.1898 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-DateTime-Format-Flexible"

Wed Jun  2 22:12:12 2021 rev:3 rq:896825 version:0.33

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-DateTime-Format-Flexible/perl-DateTime-Format-Flexible.changes
      2019-09-18 13:11:50.452684837 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-DateTime-Format-Flexible.new.1898/perl-DateTime-Format-Flexible.changes
    2021-06-02 22:12:37.864095111 +0200
@@ -1,0 +2,11 @@
+Fri May 28 03:06:24 UTC 2021 - Tina M??ller <[email protected]>
+
+- updated to 0.33
+   see /usr/share/doc/packages/perl-DateTime-Format-Flexible/Changes
+
+  0.33 Wed May 26 2021
+    - changes to how some days are parsed to fix memory leaks
+    - remove Module::Pluggable as a dependency
+      - thanks BBKR rt #136597
+
+-------------------------------------------------------------------

Old:
----
  DateTime-Format-Flexible-0.32.tar.gz

New:
----
  DateTime-Format-Flexible-0.33.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-DateTime-Format-Flexible.spec ++++++
--- /var/tmp/diff_new_pack.Xh8bnH/_old  2021-06-02 22:12:38.276094093 +0200
+++ /var/tmp/diff_new_pack.Xh8bnH/_new  2021-06-02 22:12:38.280094083 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-DateTime-Format-Flexible
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,25 +16,22 @@
 #
 
 
+%define cpan_name DateTime-Format-Flexible
 Name:           perl-DateTime-Format-Flexible
-Version:        0.32
+Version:        0.33
 Release:        0
-%define cpan_name DateTime-Format-Flexible
 Summary:        DateTime::Format::Flexible - Flexibly parse strings and turn 
them into D[cut]
 License:        Artistic-1.0 OR GPL-1.0-or-later
-Group:          Development/Libraries/Perl
-Url:            https://metacpan.org/release/%{cpan_name}
+URL:            https://metacpan.org/release/%{cpan_name}
 Source0:        
https://cpan.metacpan.org/authors/id/T/TH/THINC/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildArch:      noarch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
 BuildRequires:  perl(DateTime)
 BuildRequires:  perl(DateTime::Format::Builder) >= 0.74
 BuildRequires:  perl(DateTime::TimeZone)
 BuildRequires:  perl(List::MoreUtils)
-BuildRequires:  perl(Module::Pluggable)
 BuildRequires:  perl(Test::Exception)
 BuildRequires:  perl(Test::MockTime)
 BuildRequires:  perl(Test::NoWarnings)
@@ -42,7 +39,6 @@
 Requires:       perl(DateTime::Format::Builder) >= 0.74
 Requires:       perl(DateTime::TimeZone)
 Requires:       perl(List::MoreUtils)
-Requires:       perl(Module::Pluggable)
 %{perl_requires}
 
 %description
@@ -54,11 +50,11 @@
 parse it into a DateTime object.
 
 %prep
-%setup -q -n %{cpan_name}-%{version}
+%autosetup  -n %{cpan_name}-%{version}
 
 %build
 perl Makefile.PL INSTALLDIRS=vendor
-make %{?_smp_mflags}
+%make_build
 
 %check
 make test
@@ -69,7 +65,6 @@
 %perl_gen_filelist
 
 %files -f %{name}.files
-%defattr(-,root,root,755)
 %doc Changes example README TODO
 %license LICENSE
 

++++++ DateTime-Format-Flexible-0.32.tar.gz -> 
DateTime-Format-Flexible-0.33.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DateTime-Format-Flexible-0.32/Changes 
new/DateTime-Format-Flexible-0.33/Changes
--- old/DateTime-Format-Flexible-0.32/Changes   2019-09-14 11:09:37.000000000 
+0200
+++ new/DateTime-Format-Flexible-0.33/Changes   2021-05-27 06:08:39.000000000 
+0200
@@ -1,5 +1,10 @@
 Revision history for Perl module DateTime::Format::Flexible
 
+0.33 Wed May 26 2021
+  - changes to how some days are parsed to fix memory leaks
+  - remove Module::Pluggable as a dependency
+    - thanks BBKR rt #136597
+
 0.32 Sat Sep 14 2019
   - add support for offset timezones without a space separator and formatted 
HH:MM '2019-09-03T10:42:00.000-04:00'
     - thanks Stijn Heymans
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DateTime-Format-Flexible-0.32/META.json 
new/DateTime-Format-Flexible-0.33/META.json
--- old/DateTime-Format-Flexible-0.32/META.json 2019-09-14 11:44:38.000000000 
+0200
+++ new/DateTime-Format-Flexible-0.33/META.json 2021-05-27 06:12:02.000000000 
+0200
@@ -4,13 +4,13 @@
       "Tom Heady ([email protected])"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.1002, CPAN::Meta::Converter 
version 2.150005",
+   "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "perl_5"
    ],
    "meta-spec" : {
       "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec";,
-      "version" : "2"
+      "version" : 2
    },
    "name" : "DateTime-Format-Flexible",
    "no_index" : {
@@ -22,11 +22,7 @@
    "prereqs" : {
       "build" : {
          "requires" : {
-            "ExtUtils::MakeMaker" : "0",
-            "Test::Exception" : "0",
-            "Test::MockTime" : "0",
-            "Test::NoWarnings" : "0",
-            "Test::Simple" : "0.44"
+            "ExtUtils::MakeMaker" : "0"
          }
       },
       "configure" : {
@@ -39,12 +35,19 @@
             "DateTime" : "0",
             "DateTime::Format::Builder" : "0.74",
             "DateTime::TimeZone" : "0",
-            "List::MoreUtils" : "0",
-            "Module::Pluggable" : "0"
+            "List::MoreUtils" : "0"
+         }
+      },
+      "test" : {
+         "requires" : {
+            "Test::Exception" : "0",
+            "Test::MockTime" : "0",
+            "Test::NoWarnings" : "0",
+            "Test::Simple" : "0.44"
          }
       }
    },
    "release_status" : "stable",
-   "version" : "0.32",
-   "x_serialization_backend" : "JSON::PP version 2.27300_01"
+   "version" : "0.33",
+   "x_serialization_backend" : "JSON::PP version 4.04"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DateTime-Format-Flexible-0.32/META.yml 
new/DateTime-Format-Flexible-0.33/META.yml
--- old/DateTime-Format-Flexible-0.32/META.yml  2019-09-14 11:44:38.000000000 
+0200
+++ new/DateTime-Format-Flexible-0.33/META.yml  2021-05-27 06:12:01.000000000 
+0200
@@ -11,7 +11,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.1002, CPAN::Meta::Converter 
version 2.150005'
+generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 
2.150010'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -26,6 +26,5 @@
   DateTime::Format::Builder: '0.74'
   DateTime::TimeZone: '0'
   List::MoreUtils: '0'
-  Module::Pluggable: '0'
-version: '0.32'
+version: '0.33'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DateTime-Format-Flexible-0.32/Makefile.PL 
new/DateTime-Format-Flexible-0.33/Makefile.PL
--- old/DateTime-Format-Flexible-0.32/Makefile.PL       2018-03-09 
08:57:50.000000000 +0100
+++ new/DateTime-Format-Flexible-0.33/Makefile.PL       2021-05-26 
09:59:44.000000000 +0200
@@ -12,7 +12,6 @@
         'DateTime::Format::Builder' => 0.74, # length parameter can now be an 
arrayref
         'DateTime'                  => 0,
         'DateTime::TimeZone'        => 0,
-        'Module::Pluggable'         => 0,
         'List::MoreUtils'           => 0,
     },
     TEST_REQUIRES => {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DateTime-Format-Flexible-0.32/lib/DateTime/Format/Flexible/lang/de.pm 
new/DateTime-Format-Flexible-0.33/lib/DateTime/Format/Flexible/lang/de.pm
--- old/DateTime-Format-Flexible-0.32/lib/DateTime/Format/Flexible/lang/de.pm   
2018-03-09 10:07:40.000000000 +0100
+++ new/DateTime-Format-Flexible-0.33/lib/DateTime/Format/Flexible/lang/de.pm   
2021-05-27 06:09:18.000000000 +0200
@@ -31,60 +31,67 @@
 
 sub days
 {
-    return (
-        qr{\bMo(?:ntag)?\b}i     => 1, # Monday
-        qr{\bDi(?:enstag)?\b}i   => 2, # Tuesday
-        qr{\bMi(?:ttwoch)?\b}i   => 3, # Wednesday
-        qr{\bDo(?:nnerstag)?\b}i => 4, # Thursday
-        qr{\bFr(?:eitag)?\b}i    => 5, # Friday
-        qr{\bSa(?:mstag)?\b}i    => 6, # Saturday
-        qr{\bSonnabend\b}i       => 6, # Saturday
-        qr{\bSo(?:nntag)?\b}i    => 7, # Sunday
-    );
+    return [
+        {Montag     => 1}, # Monday
+        {Mo         => 1}, # Monday
+        {Dienstag   => 2}, # Tuesday
+        {Di         => 2}, # Tuesday
+        {Mittwoch   => 3}, # Wednesday
+        {Mi         => 3}, # Wednesday
+        {Donnerstag => 4}, # Thursday
+        {Do         => 4}, # Thursday
+        {Freitag    => 5}, # Friday
+        {Fr         => 5}, # Friday
+        {Samstag    => 6}, # Saturday
+        {Sa         => 6}, # Saturday
+        {Sonnabend  => 6}, # Saturday
+        {Sonntag    => 7}, # Sunday
+        {So         => 7}, # Sunday
+    ];
 }
 
 sub day_numbers
 {
     return (
-        qr{erster}i               => 1, # first
-        qr{ersten}i               => 1, # first
-        qr{zweiter}i              => 2, # second
-        qr{dritter}i              => 3, # third
-        qr{vierter}i              => 4, # fourth
-        qr{f??nfter}i              => 5, # fifth
-        qr{fuenfter}i             => 5, # fifth
-        qr{sechster}i             => 6, # sixth
-        qr{siebter}i              => 7, # seventh
-        qr{achter}i               => 8, # eighth
-        qr{neunter}i              => 9, # ninth
-        qr{zehnter}i              => 10, # tenth
-        qr{elfter}i               => 11, # eleventh
-        qr{zw??lfter}i             => 12, # twelfth
-        qr{zwoelfter}i            => 12, # twelfth
-        qr{dreizehnter}i          => 13, # thirteenth
-        qr{vierzehnter}i          => 14, # fourteenth
-        qr{vierzehnten}i          => 14, # fourteenth
-        qr{f??nfzehnter}i          => 15, # fifteenth
-        qr{fuenfzehnter}i         => 15, # fifteenth
-        qr{sechzehnter}i          => 16, # sixteenth
-        qr{siebzehnter}i          => 17, # seventeenth
-        qr{achtzehnter}i          => 18, # eithteenth
-        qr{neunzehnter}i          => 19, # ninteenth
-        qr{zwanzigster}i          => 20, # twentieth
-        qr{einundzwanzigster}i    => 21, # twenty first
-        qr{zweiundzwanzigster}i   => 22, # twenty second
-        qr{dreiundzwanzigster}i   => 23, # twenty third
-        qr{vierundzwanzigster}i   => 24, # twenty fourth
-        qr{f??nfundzwanzigster}i   => 25, # twenty fifth
-        qr{fuenfundzwanzigster}i  => 25, # twenty fifth
-        qr{sechsundzwanzigster}i  => 26, # twenty sixth
-        qr{siebenundzwanzigster}i => 27, # twenty seventh
-        qr{achtundzwanzigster}i   => 28, # twenty eighth
-        qr{neunundzwanzigster}i   => 29, # twenty ninth
-        qr{drei??igster}i          => 30, # thirtieth
-        qr{dreissigster}i         => 30, # thirtieth
-        qr{einunddrei??igster}i    => 31, # thirty first
-        qr{einunddreissigster}i   => 31, # thirty first
+        q{erster}               => 1, # first
+        q{ersten}               => 1, # first
+        q{zweiter}              => 2, # second
+        q{dritter}              => 3, # third
+        q{vierter}              => 4, # fourth
+        q{f??nfter}              => 5, # fifth
+        q{fuenfter}             => 5, # fifth
+        q{sechster}             => 6, # sixth
+        q{siebter}              => 7, # seventh
+        q{achter}               => 8, # eighth
+        q{neunter}              => 9, # ninth
+        q{zehnter}              => 10, # tenth
+        q{elfter}               => 11, # eleventh
+        q{zw??lfter}             => 12, # twelfth
+        q{zwoelfter}            => 12, # twelfth
+        q{dreizehnter}          => 13, # thirteenth
+        q{vierzehnter}          => 14, # fourteenth
+        q{vierzehnten}          => 14, # fourteenth
+        q{f??nfzehnter}          => 15, # fifteenth
+        q{fuenfzehnter}         => 15, # fifteenth
+        q{sechzehnter}          => 16, # sixteenth
+        q{siebzehnter}          => 17, # seventeenth
+        q{achtzehnter}          => 18, # eithteenth
+        q{neunzehnter}          => 19, # ninteenth
+        q{zwanzigster}          => 20, # twentieth
+        q{einundzwanzigster}    => 21, # twenty first
+        q{zweiundzwanzigster}   => 22, # twenty second
+        q{dreiundzwanzigster}   => 23, # twenty third
+        q{vierundzwanzigster}   => 24, # twenty fourth
+        q{f??nfundzwanzigster}   => 25, # twenty fifth
+        q{fuenfundzwanzigster}  => 25, # twenty fifth
+        q{sechsundzwanzigster}  => 26, # twenty sixth
+        q{siebenundzwanzigster} => 27, # twenty seventh
+        q{achtundzwanzigster}   => 28, # twenty eighth
+        q{neunundzwanzigster}   => 29, # twenty ninth
+        q{drei??igster}          => 30, # thirtieth
+        q{dreissigster}         => 30, # thirtieth
+        q{einunddrei??igster}    => 31, # thirty first
+        q{einunddreissigster}   => 31, # thirty first
     );
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DateTime-Format-Flexible-0.32/lib/DateTime/Format/Flexible/lang/en.pm 
new/DateTime-Format-Flexible-0.33/lib/DateTime/Format/Flexible/lang/en.pm
--- old/DateTime-Format-Flexible-0.32/lib/DateTime/Format/Flexible/lang/en.pm   
2018-03-09 10:07:29.000000000 +0100
+++ new/DateTime-Format-Flexible-0.33/lib/DateTime/Format/Flexible/lang/en.pm   
2021-05-26 10:06:14.000000000 +0200
@@ -30,51 +30,69 @@
 
 sub days
 {
-    return (
-        qr{\bMon(?:day)?\b}i    => 1,
-        qr{\bTue(?:sday)?\b}i   => 2,
-        qr{\bWed(?:nesday)?\b}i => 3,
-        qr{\bThu(?:rsday)?\b}i  => 4,
-        qr{\bFri(?:day)?\b}i    => 5,
-        qr{\bSat(?:urday)?\b}i  => 6,
-        qr{\bSun(?:day)?\b}i    => 7,
-    );
+    # order is important here, otherwise
+    # we end up removing "Mon" and leaving "day"
+    return [
+        {Monday    => 1},
+        {Mon       => 1},
+        {Tuesday   => 2},
+        {Tue       => 2},
+        {Wednesday => 3},
+        {Wed       => 3},
+        {Thursday  => 4},
+        {Thurs     => 4},
+        {Thu       => 4},
+        {Friday    => 5},
+        {Fri       => 5},
+        {Saturday  => 6},
+        {Sat       => 6},
+        {Sunday    => 7},
+        {Sun       => 7},
+    ];
 }
 
 sub day_numbers
 {
     return (
-        qr{first}            => 1,
-        qr{second}           => 2,
-        qr{third}            => 3,
-        qr{fourth}           => 4,
-        qr{fifth}            => 5,
-        qr{sixth}            => 6,
-        qr{seventh}          => 7,
-        qr{eighth}           => 8,
-        qr{ninth}            => 9,
-        qr{tenth}            => 10,
-        qr{eleventh}         => 11,
-        qr{twelfth}          => 12,
-        qr{thirteenth}       => 13,
-        qr{fourteenth}       => 14,
-        qr{fifteenth}        => 15,
-        qr{sixteenth}        => 16,
-        qr{seventeenth}      => 17,
-        qr{eithteenth}       => 18,
-        qr{ninteenth}        => 19,
-        qr{twentieth}        => 20,
-        qr{twenty\s?first}   => 21,
-        qr{twenty\s?second}  => 22,
-        qr{twenty\s?third}   => 23,
-        qr{twenty\s?fourth}  => 24,
-        qr{twenty\s?fifth}   => 25,
-        qr{twenty\s?sixth}   => 26,
-        qr{twenty\s?seventh} => 27,
-        qr{twenty\s?eighth}  => 28,
-        qr{twenty\s?ninth}   => 29,
-        qr{thirtieth}        => 30,
-        qr{thirty\s?first}   => 31,
+        q{first}          => 1,
+        q{second}         => 2,
+        q{third}          => 3,
+        q{fourth}         => 4,
+        q{fifth}          => 5,
+        q{sixth}          => 6,
+        q{seventh}        => 7,
+        q{eighth}         => 8,
+        q{ninth}          => 9,
+        q{tenth}          => 10,
+        q{eleventh}       => 11,
+        q{twelfth}        => 12,
+        q{thirteenth}     => 13,
+        q{fourteenth}     => 14,
+        q{fifteenth}      => 15,
+        q{sixteenth}      => 16,
+        q{seventeenth}    => 17,
+        q{eithteenth}     => 18,
+        q{ninteenth}      => 19,
+        q{twentieth}      => 20,
+        q{twentyfirst}    => 21,
+        q{twenty first}   => 21,
+        q{twentysecond}   => 22,
+        q{twenty second}  => 22,
+        q{twentythird}    => 23,
+        q{twenty third}   => 23,
+        q{twentyfourth}   => 24,
+        q{twenty fourth}  => 24,
+        q{twentyfifth}    => 25,
+        q{twenty fifth}   => 25,
+        q{twentysixth}    => 26,
+        q{twenty sixth}   => 26,
+        q{twentyseventh}  => 27,
+        q{twenty seventh} => 27,
+        q{twentyninth}    => 29,
+        q{twenty ninth}   => 29,
+        q{thirtieth}      => 30,
+        q{thirtyfirst}    => 31,
+        q{thirty first}   => 31,
     );
 }
 
@@ -104,7 +122,7 @@
         # remove ' of ' as in '16th of November 2003'
         qr{\bof\b}i,
         # remove number extensions. 1st, etc
-        # these must be followed by a digit, which
+        # these must be following a digit, which
         # is not captured.
         qr{(?<=\d)(?:st|nd|rd|th)\b,?}i,
         # next sunday
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DateTime-Format-Flexible-0.32/lib/DateTime/Format/Flexible/lang/es.pm 
new/DateTime-Format-Flexible-0.33/lib/DateTime/Format/Flexible/lang/es.pm
--- old/DateTime-Format-Flexible-0.32/lib/DateTime/Format/Flexible/lang/es.pm   
2018-03-09 10:07:33.000000000 +0100
+++ new/DateTime-Format-Flexible-0.33/lib/DateTime/Format/Flexible/lang/es.pm   
2021-05-26 10:07:29.000000000 +0200
@@ -36,53 +36,55 @@
 sub days
 {
     # http://www.tarver-genealogy.net/aids/spanish/sp_dates_num.html#days
-    return (
-        qr{\blunes\b}     => 1, # Monday
-        qr{\bmartes\b}    => 2, # Tuesday
-        qr{\bmi??rcoles\b} => 3, # Wednesday
-        qr{\bjueves\b}    => 4, # Thursday
-        qr{\bviernes\b}   => 5, # Friday
-        qr{\bs??bado\b}    => 6, # Saturday
-        qr{\bdomingo\b}   => 7, # Sunday
-    );
+    return [
+        {q{lunes}     => 1}, # Monday
+        {q{martes}    => 2}, # Tuesday
+        {q{mi??rcoles} => 3}, # Wednesday
+        {q{jueves}    => 4}, # Thursday
+        {q{viernes}   => 5}, # Friday
+        {q{s??bado}    => 6}, # Saturday
+        {q{domingo}   => 7}, # Sunday
+    ];
 }
 
 sub day_numbers
 {
     # http://www.tarver-genealogy.net/aids/spanish/sp_dates_num.html#days
     return (
-        qr{primero}                 => 1, # first
-        qr{segundo}                 => 2, # second
-        qr{tercero}                 => 3, # third
-        qr{cuarto}                  => 4, # fourth
-        qr{quinto}                  => 5, # fifth
-        qr{sexto}                   => 6, # sixth
-        qr{septimo}                 => 7, # seventh
-        qr{octavo}                  => 8, # eighth
-        qr{nono|noveno}             => 9, # ninth
-        qr{decimo}                  => 10, # tenth
-        qr{undecimo|decimoprimero}  => 11, # eleventh
-        qr{duodecimo|decimosegundo} => 12, # twelfth
-        qr{decimotercero}           => 13, # thirteenth
-        qr{decimocuarto}            => 14, # fourteenth
-        qr{decimoquinto}            => 15, # fifteenth
-        qr{decimosexto}             => 16, # sixteenth
-        qr{decimo\sseptimo}         => 17, # seventeenth
-        qr{decimoctavo}             => 18, # eithteenth
-        qr{decimonono}              => 19, # ninteenth
-        qr{vigesimo}                => 20, # twentieth
-        qr{vigesimo\sprimero}       => 21, # twenty first
-        qr{vigesimo\ssegundo}       => 22, # twenty second
-        qr{vigesimo\stercero}       => 23, # twenty third
-        qr{vigesimo\scuarto}        => 24, # twenty fourth
-        qr{veinticuatro}            => 24, # twenty four
-        qr{vigesimo\squinto}        => 25, # twenty fifth
-        qr{vigesimo\ssexto}         => 26, # twenty sixth
-        qr{vigesimo\sseptimo}       => 27, # twenty seventh
-        qr{vigesimo\soctavo}        => 28, # twenty eighth
-        qr{vigesimo\snono}          => 29, # twenty ninth
-        qr{trigesimo}               => 30, # thirtieth
-        qr{trigesimo\sprimero}      => 31, # thirty first
+        q{primero}           => 1, # first
+        q{segundo}           => 2, # second
+        q{tercero}           => 3, # third
+        q{cuarto}            => 4, # fourth
+        q{quinto}            => 5, # fifth
+        q{sexto}             => 6, # sixth
+        q{septimo}           => 7, # seventh
+        q{octavo}            => 8, # eighth
+        q{nono|noveno}       => 9, # ninth
+        q{decimo}            => 10, # tenth
+        q{undecimo}          => 11, # eleventh
+        q{decimoprimero}     => 11, # eleventh
+        q{duodecimo}         => 12, # twelfth
+        q{decimosegundo}     => 12, # twelfth
+        q{decimotercero}     => 13, # thirteenth
+        q{decimocuarto}      => 14, # fourteenth
+        q{decimoquinto}      => 15, # fifteenth
+        q{decimosexto}       => 16, # sixteenth
+        q{decimo septimo}    => 17, # seventeenth
+        q{decimoctavo}       => 18, # eithteenth
+        q{decimonono}        => 19, # ninteenth
+        q{vigesimo}          => 20, # twentieth
+        q{vigesimo primero}  => 21, # twenty first
+        q{vigesimo segundo}  => 22, # twenty second
+        q{vigesimo tercero}  => 23, # twenty third
+        q{vigesimo cuarto}   => 24, # twenty fourth
+        q{veinticuatro}      => 24, # twenty four
+        q{vigesimo quinto}   => 25, # twenty fifth
+        q{vigesimo sexto}    => 26, # twenty sixth
+        q{vigesimo septimo}  => 27, # twenty seventh
+        q{vigesimo octavo}   => 28, # twenty eighth
+        q{vigesimo nono}     => 29, # twenty ninth
+        q{trigesimo}         => 30, # thirtieth
+        q{trigesimo primero} => 31, # thirty first
     );
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DateTime-Format-Flexible-0.32/lib/DateTime/Format/Flexible/lang.pm 
new/DateTime-Format-Flexible-0.33/lib/DateTime/Format/Flexible/lang.pm
--- old/DateTime-Format-Flexible-0.32/lib/DateTime/Format/Flexible/lang.pm      
2018-03-09 12:03:41.000000000 +0100
+++ new/DateTime-Format-Flexible-0.33/lib/DateTime/Format/Flexible/lang.pm      
2021-05-27 06:10:38.000000000 +0200
@@ -3,7 +3,6 @@
 use strict;
 use warnings;
 
-use Module::Pluggable require => 1 , search_path => [__PACKAGE__];
 use List::MoreUtils 'any';
 
 sub new
@@ -16,9 +15,22 @@
         $self->{lang} = [$self->{lang}];
     }
 
+    $self->{_plugins} = [
+        'DateTime::Format::Flexible::lang::de',
+        'DateTime::Format::Flexible::lang::en',
+        'DateTime::Format::Flexible::lang::es',
+    ];
+
+    foreach my $plugin (@{$self->{_plugins}}) {
+        my $path   = $plugin . ".pm";
+        $path =~ s{::}{/}g;
+        require $path;
+    }
     return $self;
 }
 
+sub plugins {return @{$_[0]->{_plugins}}}
+
 sub _cleanup
 {
     my ( $self , $date , $p ) = @_;
@@ -35,23 +47,23 @@
         }
         printf( "# not skipping %s\n", $plug ) if $ENV{DFF_DEBUG};
 
-        printf( "#   before math: %s\n", $date ) if $ENV{DFF_DEBUG};;
+        printf( "#   before math: %s\n", $date ) if $ENV{DFF_DEBUG};
         $date = $self->_do_math( $plug , $date );
-        printf( "#   before string_dates: %s\n", $date ) if $ENV{DFF_DEBUG};;
+        printf( "#   before string_dates: %s\n", $date ) if $ENV{DFF_DEBUG};
         $date = $self->_string_dates( $plug , $date );
-        printf( "#   before fix_alpha_month: %s\n", $date ) if 
$ENV{DFF_DEBUG};;
+        printf( "#   before fix_alpha_month: %s\n", $date ) if $ENV{DFF_DEBUG};
         ( $date , $p ) = $self->_fix_alpha_month( $plug , $date , $p );
-        printf( "#   before remove_day_names: %s\n", $date ) if 
$ENV{DFF_DEBUG};;
+        printf( "#   before remove_day_names: %s\n", $date ) if 
$ENV{DFF_DEBUG};
         $date = $self->_remove_day_names( $plug , $date );
-        printf( "#   before fix_hours: %s\n", $date ) if $ENV{DFF_DEBUG};;
+        printf( "#   before fix_hours: %s\n", $date ) if $ENV{DFF_DEBUG};
         $date = $self->_fix_hours( $plug , $date );
-        printf( "#   before remove_strings: %s\n", $date ) if $ENV{DFF_DEBUG};;
+        printf( "#   before remove_strings: %s\n", $date ) if $ENV{DFF_DEBUG};
         $date = $self->_remove_strings( $plug , $date );
-        printf( "#   before locate_time: %s\n", $date ) if $ENV{DFF_DEBUG};;
+        printf( "#   before locate_time: %s\n", $date ) if $ENV{DFF_DEBUG};
         $date = $self->_locate_time( $plug , $date );
-        printf( "#   before fix_internal_tz: %s\n", $date ) if 
$ENV{DFF_DEBUG};;
+        printf( "#   before fix_internal_tz: %s\n", $date ) if $ENV{DFF_DEBUG};
         ( $date , $p ) = $self->_fix_internal_tz( $plug , $date , $p );
-        printf( "#   finished: %s\n", $date ) if $ENV{DFF_DEBUG};;
+        printf( "#   finished: %s\n", $date ) if $ENV{DFF_DEBUG};
     }
     return ( $date , $p );
 }
@@ -77,7 +89,7 @@
     my ( $self , $plug , $date ) = @_;
 
     my %relative_strings = $plug->relative;
-    my %day_strings = $plug->days;
+    my $day_strings = $plug->days;
     my %month_strings = $plug->months;
 
     my $instructions = {
@@ -98,19 +110,23 @@
 
         if ( $date =~ m{$rx}mix )
         {
-            $date =~ s{$rx}{}mx;
+            $date =~ s{$rx}{}mix;
             if ($has_units)
             {
                 $date = $self->_set_units( $plug , $date, $direction );
             }
             else
             {
-                foreach my $day (keys %day_strings)
+                foreach my $set (@{$day_strings})
                 {
-                    if ($date =~ m{$day}mix)
+                    foreach my $day (keys %{$set})
                     {
-                        $date = $self->_set_day( $plug , $date , $day , 
$direction );
-                        $date =~ s{$day}{}mx;
+
+                        if ($date =~ m{$day}mix)
+                        {
+                            $date = $self->_set_day( $plug , $date , $day , 
$direction );
+                            $date =~ s{$day}{}mix;
+                        }
                     }
                 }
                 foreach my $month (keys %month_strings)
@@ -118,7 +134,7 @@
                     if ($date =~ m{$month}mix)
                     {
                         $date = $self->_set_month( $plug , $date , $month , 
$direction );
-                        $date =~ s{$month}{}mx;
+                        $date =~ s{$month}{}mix;
                     }
                 }
             }
@@ -174,11 +190,10 @@
 {
     my ( $self , $plug , $date , $day , $direction ) = @_;
 
-    my %day_strings = $plug->days;
-
     my $base_dt = DateTime::Format::Flexible->base->clone;
     my $dow = $base_dt->day_of_week;
-    my $date_dow = $day_strings{$day};
+    my $date_dow = $self->_alpha_day_to_int($plug, $day);
+
     if ( $direction eq 'past' )
     {
         my $amount = $dow - $date_dow;
@@ -248,7 +263,7 @@
     my %day_numbers = $plug->day_numbers;
     foreach my $key ( keys %day_numbers )
     {
-        if ( $date =~ m{$key}mxi )
+        if (index(lc($date), lc($key)) >= 0)
         {
             my $new_value = $day_numbers{$key};
             $date =~ s{$key}{n${new_value}n}mix;
@@ -295,44 +310,66 @@
 sub _remove_day_names
 {
     my ( $self , $plug , $date ) = @_;
-    my %days = $plug->days;
-    foreach my $day_name ( keys %days )
+    my $days = $plug->days;
+    foreach my $set (@{$days})
     {
-        # if the day name is by itself, make it the upcoming day
-        # eg: monday = next monday
-        if ( $date =~ m{\A$day_name\z}mx or
-             $date =~ m{$day_name\sat}mx )
+        foreach my $day_name ( keys %{$set} )
         {
-            my $dt = $self->{base}->clone->truncate( to => 'day' );
-            if ( $days{$day_name} == $dt->dow )
-            {
-                my $str = $dt->ymd;
-                $date =~ s{$day_name}{$str};
-                return $date;
-            }
-            elsif ( $days{$day_name} > $dt->dow )
+            # if the day name is by itself, make it the upcoming day
+            # eg: monday = next monday
+            if (( lc($date) eq lc($day_name)) or (index(lc($date), 
lc($day_name) . ' at') >= 0 ))
             {
-                $dt->add( days => $days{$day_name} - $dt->dow );
-                my $str = $dt->ymd;
-                $date =~ s{$day_name}{$str};
-                return $date;
+                my $dt = $self->{base}->clone->truncate( to => 'day' );
+                my $date_dow = $set->{$day_name};
+
+                if ( $date_dow == $dt->dow )
+                {
+                    my $str = $dt->ymd;
+                    $date =~ s{$day_name}{$str}i;
+                    return $date;
+                }
+                elsif ( $date_dow > $dt->dow )
+                {
+                    $dt->add( days => $date_dow - $dt->dow );
+                    my $str = $dt->ymd;
+                    $date =~ s{$day_name}{$str}i;
+                    return $date;
+                }
+                else
+                {
+                    $dt->add( days => $date_dow - $dt->dow + 7 );
+                    my $str = $dt->ymd;
+                    $date =~ s{$day_name}{$str}i;
+                    return $date;
+                }
             }
-            else
+            # otherwise, just strip it out
+            if ( $date =~ m{\b$day_name\b}mxi )
             {
-                $dt->add( days => $days{$day_name} - $dt->dow + 7 );
-                my $str = $dt->ymd;
-                $date =~ s{$day_name}{$str};
+                $date =~ s{$day_name,?}{}gmix;
                 return $date;
             }
         }
-        # otherwise, just strip it out
-        if ( $date =~ m{$day_name}mxi )
+    }
+    return $date;
+}
+
+sub _alpha_day_to_int
+{
+    my ( $self, $plug, $day ) = @_;
+
+    my $day_strings = $plug->days;
+    foreach my $set (@{$day_strings})
+    {
+        foreach my $key (keys %{$set})
         {
-            $date =~ s{$day_name,?}{}gmix;
-            return $date;
+            if (lc($key) eq lc($day))
+            {
+                return $set->{$key};
+            }
         }
     }
-    return $date;
+    return;
 }
 
 # fix noon and midnight, named hours
@@ -397,6 +434,10 @@
 
 Instantiate a new instance of this module.
 
+=head2 plugins
+
+Returns a list of available language plugins.
+
 =head1 AUTHOR
 
     Tom Heady
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DateTime-Format-Flexible-0.32/lib/DateTime/Format/Flexible.pm 
new/DateTime-Format-Flexible-0.33/lib/DateTime/Format/Flexible.pm
--- old/DateTime-Format-Flexible-0.32/lib/DateTime/Format/Flexible.pm   
2019-09-14 11:41:22.000000000 +0200
+++ new/DateTime-Format-Flexible-0.33/lib/DateTime/Format/Flexible.pm   
2021-05-27 06:08:55.000000000 +0200
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.32';
+our $VERSION = '0.33';
 
 use base 'DateTime::Format::Builder';
 

Reply via email to