[Dbix-class] Re: Patch for DBIx-Class-Cursor-Cached

Bill Moseley moseley at hank.org
Mon Nov 29 14:31:38 GMT 2010


Nobody acknowledging ownership here?  I'll file a bug on the package.

On Sat, Nov 27, 2010 at 10:14 AM, Bill Moseley <moseley at hank.org> wrote:

> diff --git a/lib/DBIx/Class/Cursor/Cached.pm
> b/lib/DBIx/Class/Cursor/Cached.pm
> index 5eaf6b0..da13170 100644
> --- a/lib/DBIx/Class/Cursor/Cached.pm
> +++ b/lib/DBIx/Class/Cursor/Cached.pm
> @@ -48,6 +48,7 @@ sub reset {
>
>  sub _build_cache_key {
>    my ($class, $storage, $args, $attrs) =3D @_;
> +  local $Storable::canonical =3D 1;
>    return Digest::SHA1::sha1_hex(Storable::nfreeze([ $args, $attrs ]));
>  }
>
> I spent some time trying to get a failing test, but I think the test setup
> (just a single CD class) is not complex enough to make it fail.  Is there
> any doubt that $Storable::canonical =3D 1 is required?
>
> When testing in my app Storable is returning over 15K of data to use for
> the key digest, where in the test in ::Cursor::Cached is only returning s=
ome
> 300 bytes.  So, a lot more room for sorting differences.
>
> I guess this module is not getting much use, considering it was uploaded =
to
> cpan in 2007.
>
>
>
> --
> Bill Moseley
> moseley at hank.org
>



-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20101129/b84=
6e06d/attachment.htm


More information about the DBIx-Class mailing list