perl/cpan
Jonathan Nieder b1521a81d3 Memoize::Storable: respect 'nstore' option not respected
Memoize(3perl) says:

                tie my %cache => 'Memoize::Storable', $filename, 'nstore';
                memoize 'function', SCALAR_CACHE => [HASH => \%cache];

        Include the ‘nstore’ option to have the "Storable" database
        written in ‘network order’.  (See Storable for more details
        about this.)

In fact the "nstore" option does no such thing.  Option parsing looks
like this:

        @options{@_} = ();

$self->{OPTIONS}{'nstore'} is accordingly set to undef.  Later
Memoize::Storable checks if the option is true, and since undef is
not true, the "else" branch is always taken.

        if ($self->{OPTIONS}{'nstore'}) {
                Storable::nstore($self->{H}, $self->{FILENAME});
        } else {
                Storable::store($self->{H}, $self->{FILENAME});
        }

Correcting the condition to (exists $self->{OPTIONS}{'nstore'}) fixes
it.

Noticed because git-svn, which uses the 'nstore' option for its
on-disk caches, was producing

        Byte order is not compatible at ../../lib/Storable.pm

when run using a perl with a different integer size (and hence
byteorder).

Reported by Tim Retout (RT#77790)

Bug-Debian: http://bugs.debian.org/587650
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=77790
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=77790

Gbp-Pq: Topic fixes
Gbp-Pq: Name memoize_storable_nstore.diff
2022-05-14 02:41:16 +08:00
..
Archive-Tar Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
AutoLoader Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
CPAN Fix CPAN::FirstTime defaults with nonexisting site dirs if a parent is writable 2022-05-14 02:41:16 +08:00
CPAN-Meta Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
CPAN-Meta-Requirements Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
CPAN-Meta-YAML Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Compress-Raw-Bzip2 Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Compress-Raw-Zlib Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Config-Perl-V Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
DB_File Remove overly restrictive DB_File version check. 2022-05-14 02:41:15 +08:00
Digest Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Digest-MD5 Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Digest-SHA Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Encode Tweak enc2xs to follow symlinks and ignore missing @INC directories. 2022-05-14 02:41:15 +08:00
ExtUtils-Constant Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
ExtUtils-Install Respect umask during installation 2022-05-14 02:41:15 +08:00
ExtUtils-MakeMaker Document that CCFLAGS should include $Config{ccflags} 2022-05-14 02:41:15 +08:00
ExtUtils-Manifest Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
File-Fetch Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
File-Path Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
File-Temp Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Filter-Util-Call Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Getopt-Long Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
HTTP-Tiny Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
IO-Compress Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
IO-Socket-IP Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
IO-Zlib Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
IPC-Cmd Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
IPC-SysV Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
JSON-PP Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Locale-Maketext-Simple Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
MIME-Base64 Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Math-BigInt Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Math-BigInt-FastCalc Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Math-BigRat Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Math-Complex Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Memoize Memoize::Storable: respect 'nstore' option not respected 2022-05-14 02:41:16 +08:00
Module-Load Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Module-Load-Conditional Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Module-Loaded Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Module-Metadata Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
NEXT Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Params-Check Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Perl-OSType Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
PerlIO-via-QuotedPrint Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Pod-Checker Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Pod-Escapes Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Pod-Parser Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Pod-Perldoc Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Pod-Simple Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Pod-Usage Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Scalar-List-Utils Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Socket Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Sys-Syslog Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Term-ANSIColor Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Term-Cap Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Test-Harness Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Test-Simple Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Text-Balanced Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Text-ParseWords Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Text-Tabs Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Tie-RefHash Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Time-Local Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Time-Piece Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Unicode-Collate Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Win32 Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
Win32API-File Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
autodie Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
bignum Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
experimental Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
libnet Set location of libnet.cfg to /etc/perl/Net as /usr may not be writable. 2022-05-14 02:41:15 +08:00
parent Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
perlfaq/lib Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
podlators Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
version Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00
.dir-locals.el Import Upstream version 5.30.0 2022-05-14 02:40:32 +08:00