[Jifty-commit] r5027 - in Jifty-DBI/branches/tisql: lib/Jifty/DBI
Jifty commits
jifty-commit at lists.jifty.org
Tue Feb 5 21:17:17 EST 2008
Author: ruz
Date: Tue Feb 5 21:17:17 2008
New Revision: 5027
Modified:
Jifty-DBI/branches/tisql/ (props changed)
Jifty-DBI/branches/tisql/lib/Jifty/DBI/Collection.pm
Log:
r4732 at cubic-pc (orig r4731): sartak | 2007-12-17 23:30:35 +0300
r49172 at onn: sartak | 2007-12-17 15:30:17 -0500
We were leaking the collection on set_page_info. Yuck! We need some way to find these Scalar::Defer leaks
Modified: Jifty-DBI/branches/tisql/lib/Jifty/DBI/Collection.pm
==============================================================================
--- Jifty-DBI/branches/tisql/lib/Jifty/DBI/Collection.pm (original)
+++ Jifty-DBI/branches/tisql/lib/Jifty/DBI/Collection.pm Tue Feb 5 21:17:17 2008
@@ -3,6 +3,7 @@
use warnings;
use strict;
use Scalar::Defer qw/lazy/;
+use Scalar::Util qw/weaken/;
=head1 NAME
@@ -1747,7 +1748,10 @@
);
return if $self->derived;
- $self->pager->total_entries( lazy { $self->count_all } )
+ my $weakself = $self;
+ weaken($weakself);
+
+ $self->pager->total_entries( lazy { $weakself->count_all } )
->entries_per_page( $args{'per_page'} )
->current_page( $args{'current_page'} );
More information about the Jifty-commit
mailing list