Re: Missing *pm files for DateTime::Locale
Norbert - Have you tried perl -MStorable=retrieve -e "\$x = retrieve( './VeriPars.dat', 0 );" As I read the docs, setting the obscurely-documented flags argument to zero causes Storable not to attempt to make objects out of references. Whether this output is usable you will have to see for yourself. Another alternative to installing a REALLY OLD version of the DateTime-Locale distribution might be to install a code hook in @INC to provide dummy locale modules as needed. This is an advanced topic (read: you have to be REALLY desperate), but is documented (more or less) in perldoc -f require Tom Wyant (mailing address to the contrary notwithstanding).
AW: Missing *pm files for DateTime::Locale
Hi Dave, thanks for your efforts. BR Norbert > -Ursprüngliche Nachricht- > Von: Dave Howorth > Gesendet: Freitag, 17. November 2023 22:31 > An: datetime@perl.org > Betreff: Re: Missing *pm files for DateTime::Locale > > On Fri, 17 Nov 2023 20:35:19 + > Dave Howorth wrote: > > > On Fri, 17 Nov 2023 18:34:27 + > > "Zacharias, Norbert" via datetime wrote: > > > > > Hi all, > > > > > > I try to install DateTime. Even there is no error reported during > > > installation it seems that the *pm files like en_US.pm are missing. > > > > Have you installed DateTime::Locale? > > > > I believe it is a separate module to DateTime. > > Sorry, I think I spoke nonsense. But I don't believe there is an en_US.pm > file in the > release, just an en_US.pod. You need to load a locale in order to refer to it. This e-mail may contain privileged or confidential information. If you are not the intended recipient: (1) you may not disclose, use, distribute, copy or rely upon this message or attachment(s); and (2) please notify the sender by reply e-mail, and then delete this message and its attachment(s). Underwriters Laboratories Inc. and its affiliates disclaim all liability for any errors, omissions, corruption or virus in this message or any attachments.
AW: Missing *pm files for DateTime::Locale
Hi Dave, > Von: Dave Rolsky > Gesendet: Freitag, 17. November 2023 23:29 > An: Zacharias, Norbert > Cc: datetime@perl.org > Betreff: Re: Missing *pm files for DateTime::Locale > Hi Norbert, > The way the locale data is packaged changed a while back in the 1.00 release > in > 2015. There's no longer a `.pm` file per locale. If you want to preload locale > data, you should just call `DateTime::Locale->load($locale)`. Thanks for this information. > I'm guessing you have some `Storable`-serialized `DateTime` objects that > included pre-1.00 locales. The only way to thaw them is probably to install an > older `DateTime-Locale` release. I have made a small test script use Storable qw(nstore retrieve); my $storfile ='./teststorable.dat'; my %testh=( 'eins' => 1, 'zwei' => 2); nstore(\%testh,$storfile); my $tref = retrieve($storfile); print join("\n",keys %$tref); which worked without any problems! Then I tried to retrieve an file which was produced some time before and get the know error. Investigating the dat file yields: 0180 07 52 53 44 46 69 46 6f 14 13 42 13 02 17 44 61 |.RSDFiFo..B...Da| 0190 74 65 54 69 6d 65 3a 3a 4c 6f 63 61 6c 65 3a 3a |teTime::Locale::| 01a0 65 6e 5f 55 53 05 65 6e 5f 55 53 42 13 02 1c 44 |en_US.en_USB...D| 01b0 61 74 65 54 69 6d 65 3a 3a 54 69 6d 65 5a 6f 6e |ateTime::TimeZon| 01c0 65 3a 3a 46 6c 6f 61 74 69 6e 67 08 66 6c 6f 61 |e::Floating.floa| 01d0 74 69 6e 67 42 05 82 08 44 61 74 65 54 69 6d 65 |tingB...DateTime| 01e0 3f 75 74 63 5f 72 64 5f 64 61 79 73 3a 37 33 38 |?utc_rd_days:738| 01f0 31 39 33 7c 75 74 63 5f 72 64 5f 73 65 63 73 3a |193|utc_rd_secs:| 0200 35 31 30 30 30 7c 72 64 5f 6e 61 6e 6f 73 65 63 |51000|rd_nanosec| 0210 73 3a 30 7c 76 65 72 73 69 6f 6e 3a 31 2e 32 30 |s:0|version:1.20| 0220 03 00 00 00 14 00 00 00 15 00 00 00 16 00 00 00 || 0230 0c 4d 65 61 73 49 6e 74 53 74 61 72 74 0a 11 4e |.MeasIntStart..N| 0240 6f 72 62 65 72 74 20 5a 61 63 68 61 72 69 61 73 |orbert Zacharias| 0250 00 00 00 0a 41 75 74 68 6f 72 4e 61 6d 65 0a 05 |AuthorName..| This supports your theory. > Longer-term, I'd suggest _not_ using `Storable` to serialize data. It > generates > data that is too tied together with the internals of the libraries that > produced > the objects. Do you have a suggestion for an alternative? Also I have to check how to migrate all the old storable files to the new version. If anyone has an idea how this could work, please let me know! Thanks a lot Have fun Norbert This e-mail may contain privileged or confidential information. If you are not the intended recipient: (1) you may not disclose, use, distribute, copy or rely upon this message or attachment(s); and (2) please notify the sender by reply e-mail, and then delete this message and its attachment(s). Underwriters Laboratories Inc. and its affiliates disclaim all liability for any errors, omissions, corruption or virus in this message or any attachments.
Re: Missing *pm files for DateTime::Locale
Hi Norbert, The way the locale data is packaged changed a while back in the 1.00 release in 2015. There's no longer a `.pm` file per locale. If you want to preload locale data, you should just call `DateTime::Locale->load($locale)`. I'm guessing you have some `Storable`-serialized `DateTime` objects that included pre-1.00 locales. The only way to thaw them is probably to install an older `DateTime-Locale` release. Longer-term, I'd suggest _not_ using `Storable` to serialize data. It generates data that is too tied together with the internals of the libraries that produced the objects. Cheers, Dave Rolsky http://blog.urth.org https://github.com/autarch On Fri, Nov 17, 2023 at 12:34 PM Zacharias, Norbert via datetime < datetime@perl.org> wrote: > Hi all, > > I try to install DateTime. Even there is no error reported during > installation it seems that the *pm files like en_US.pm are missing. The > only related files I can find are *.pod like en_US.pod. > If I try to use Storable::retrieve I get an error message > > perl -e "use Storable retrieve ; \$x=retrieve('./VeriPars.dat');" > Can't locate DateTime/Locale/en_US.pm in @INC (you may need to install the > DateTime::Locale::en_US module) (@INC contains: > /usr/local/lib/perl5/site_perl/5.32/x86_64-cygwin-threads > /usr/local/share/perl5/site_perl/5.32 > /usr/lib/perl5/vendor_perl/5.32/x86_64-cygwin-threads > /usr/share/perl5/vendor_perl/5.32 /usr/lib/perl5/5.32/x86_64-cygwin-threads > /usr/share/perl5/5.32) at > /usr/lib/perl5/5.32/x86_64-cygwin-threads/Storable.pm line 421. > BEGIN failed--compilation aborted, at -e line 1. > > Storable is uptodate: > > Storable > - > (no description) > N/NW/NWCLARK/Storable-3.25.tar.gz > > /usr/local/lib/perl5/site_perl/5.32/x86_64-cygwin-threads/Storable.pm > Installed: 3.25 > CPAN: 3.25 up to date > Nicholas Clark (NWCLARK) > nwc10+please+use+perlbug+for+perl+quer...@colon.colondot.net > > > Do I miss something? > > Thanks in advance for your help > > Norbert Zacharias > > UL International GmbH > Kasinoplatz 3 > 26122 Oldenburg, Germany > > T:: +49 441 77937 110 | F:: +49 441 77937 133 | norbert.zachar...@ul.com| > www.ul.com > > Commercial Register No.: Amtsgericht Oldenburg, HRB 130241 > VAT DE117895432 St-Nr. 20/200/32924-PAN AADCD15130A > Geschäftsführer/Managing Director: Mirko Bautz, Ryan David Robinson, Gitte > Schjøtz > > > > This e-mail may contain privileged or confidential information. If you are > not the intended recipient: (1) you may not disclose, use, distribute, copy > or rely upon this message or attachment(s); and (2) please notify the > sender by reply e-mail, and then delete this message and its attachment(s). > Underwriters Laboratories Inc. and its affiliates disclaim all liability > for any errors, omissions, corruption or virus in this message or any > attachments. >
Re: Missing *pm files for DateTime::Locale
On Fri, 17 Nov 2023 20:35:19 + Dave Howorth wrote: > On Fri, 17 Nov 2023 18:34:27 + > "Zacharias, Norbert" via datetime wrote: > > > Hi all, > > > > I try to install DateTime. Even there is no error reported during > > installation it seems that the *pm files like en_US.pm are > > missing. > > Have you installed DateTime::Locale? > > I believe it is a separate module to DateTime. Sorry, I think I spoke nonsense. But I don't believe there is an en_US.pm file in the release, just an en_US.pod. You need to load a locale in order to refer to it. > > The only related files I can find are *.pod like en_US.pod. If I try > > to use Storable::retrieve I get an error message > > > > perl -e "use Storable retrieve ; \$x=retrieve('./VeriPars.dat');" > > Can't locate DateTime/Locale/en_US.pm in @INC (you may need to > > install the DateTime::Locale::en_US module) (@INC > > contains: /usr/local/lib/perl5/site_perl/5.32/x86_64-cygwin-threads > > /usr/local/share/perl5/site_perl/5.32 > > /usr/lib/perl5/vendor_perl/5.32/x86_64-cygwin-threads > > /usr/share/perl5/vendor_perl/5.32 /usr/lib/perl5/5.32/x86_64-cygwin-threads > > /usr/share/perl5/5.32) > > at /usr/lib/perl5/5.32/x86_64-cygwin-threads/Storable.pm line 421. > > BEGIN failed--compilation aborted, at -e line 1. > > > > Storable is uptodate: > > > > Storable > > - > > (no description) > > N/NW/NWCLARK/Storable-3.25.tar.gz > > > > /usr/local/lib/perl5/site_perl/5.32/x86_64-cygwin-threads/Storable.pm > > Installed: 3.25 > > CPAN: 3.25 up to date > > Nicholas Clark (NWCLARK) > > nwc10+please+use+perlbug+for+perl+quer...@colon.colondot.net > > > > > > Do I miss something? > > > > Thanks in advance for your help
Re: Missing *pm files for DateTime::Locale
On Fri, 17 Nov 2023 18:34:27 + "Zacharias, Norbert" via datetime wrote: > Hi all, > > I try to install DateTime. Even there is no error reported during > installation it seems that the *pm files like en_US.pm are missing. Have you installed DateTime::Locale? I believe it is a separate module to DateTime. > The only related files I can find are *.pod like en_US.pod. If I try > to use Storable::retrieve I get an error message > > perl -e "use Storable retrieve ; \$x=retrieve('./VeriPars.dat');" > Can't locate DateTime/Locale/en_US.pm in @INC (you may need to > install the DateTime::Locale::en_US module) (@INC > contains: /usr/local/lib/perl5/site_perl/5.32/x86_64-cygwin-threads > /usr/local/share/perl5/site_perl/5.32 > /usr/lib/perl5/vendor_perl/5.32/x86_64-cygwin-threads > /usr/share/perl5/vendor_perl/5.32 /usr/lib/perl5/5.32/x86_64-cygwin-threads > /usr/share/perl5/5.32) > at /usr/lib/perl5/5.32/x86_64-cygwin-threads/Storable.pm line 421. > BEGIN failed--compilation aborted, at -e line 1. > > Storable is uptodate: > > Storable > - > (no description) > N/NW/NWCLARK/Storable-3.25.tar.gz > /usr/local/lib/perl5/site_perl/5.32/x86_64-cygwin-threads/Storable.pm > Installed: 3.25 > CPAN: 3.25 up to date > Nicholas Clark (NWCLARK) > nwc10+please+use+perlbug+for+perl+quer...@colon.colondot.net > > > Do I miss something? > > Thanks in advance for your help > > Norbert Zacharias > > UL International GmbH > Kasinoplatz 3 > 26122 Oldenburg, Germany > > T:: +49 441 77937 110 | F:: +49 441 77937 133 | > norbert.zachar...@ul.com| www.ul.com > > Commercial Register No.: Amtsgericht Oldenburg, HRB 130241 > VAT DE117895432 St-Nr. 20/200/32924-PAN AADCD15130A > Geschäftsführer/Managing Director: Mirko Bautz, Ryan David Robinson, > Gitte Schjøtz > > > > This e-mail may contain privileged or confidential information. If > you are not the intended recipient: (1) you may not disclose, use, > distribute, copy or rely upon this message or attachment(s); and (2) > please notify the sender by reply e-mail, and then delete this > message and its attachment(s). Underwriters Laboratories Inc. and its > affiliates disclaim all liability for any errors, omissions, > corruption or virus in this message or any attachments.
Missing *pm files for DateTime::Locale
Hi all, I try to install DateTime. Even there is no error reported during installation it seems that the *pm files like en_US.pm are missing. The only related files I can find are *.pod like en_US.pod. If I try to use Storable::retrieve I get an error message perl -e "use Storable retrieve ; \$x=retrieve('./VeriPars.dat');" Can't locate DateTime/Locale/en_US.pm in @INC (you may need to install the DateTime::Locale::en_US module) (@INC contains: /usr/local/lib/perl5/site_perl/5.32/x86_64-cygwin-threads /usr/local/share/perl5/site_perl/5.32 /usr/lib/perl5/vendor_perl/5.32/x86_64-cygwin-threads /usr/share/perl5/vendor_perl/5.32 /usr/lib/perl5/5.32/x86_64-cygwin-threads /usr/share/perl5/5.32) at /usr/lib/perl5/5.32/x86_64-cygwin-threads/Storable.pm line 421. BEGIN failed--compilation aborted, at -e line 1. Storable is uptodate: Storable - (no description) N/NW/NWCLARK/Storable-3.25.tar.gz /usr/local/lib/perl5/site_perl/5.32/x86_64-cygwin-threads/Storable.pm Installed: 3.25 CPAN: 3.25 up to date Nicholas Clark (NWCLARK) nwc10+please+use+perlbug+for+perl+quer...@colon.colondot.net Do I miss something? Thanks in advance for your help Norbert Zacharias UL International GmbH Kasinoplatz 3 26122 Oldenburg, Germany T:: +49 441 77937 110 | F:: +49 441 77937 133 | norbert.zachar...@ul.com| www.ul.com Commercial Register No.: Amtsgericht Oldenburg, HRB 130241 VAT DE117895432 St-Nr. 20/200/32924-PAN AADCD15130A Geschäftsführer/Managing Director: Mirko Bautz, Ryan David Robinson, Gitte Schjøtz This e-mail may contain privileged or confidential information. If you are not the intended recipient: (1) you may not disclose, use, distribute, copy or rely upon this message or attachment(s); and (2) please notify the sender by reply e-mail, and then delete this message and its attachment(s). Underwriters Laboratories Inc. and its affiliates disclaim all liability for any errors, omissions, corruption or virus in this message or any attachments.