[Jifty-commit] r4719 - in jifty/branches/jquery: lib/Jifty/Web/Form
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Dec 17 00:38:55 EST 2007
Author: gugod
Date: Mon Dec 17 00:38:55 2007
New Revision: 4719
Modified:
jifty/branches/jquery/ (props changed)
jifty/branches/jquery/lib/Jifty/Web/Form/Field.pm
Log:
r8530 at GOP (orig r4712): sartak | 2007-12-17 05:30:49 +0800
r49135 at onn: sartak | 2007-12-16 16:30:44 -0500
Another copied weakref in Jifty::Web::Form::Field, though this code was just changed so I don't think it explains our white whale
Modified: jifty/branches/jquery/lib/Jifty/Web/Form/Field.pm
==============================================================================
--- jifty/branches/jquery/lib/Jifty/Web/Form/Field.pm (original)
+++ jifty/branches/jquery/lib/Jifty/Web/Form/Field.pm Mon Dec 17 00:38:55 2007
@@ -44,7 +44,7 @@
use base 'Jifty::Web::Form::Element';
-use Scalar::Util;
+use Scalar::Util qw/weaken/;
use Scalar::Defer qw/force/;
use HTML::Entities;
@@ -297,15 +297,16 @@
=cut
sub action {
- my $self = shift;
- if (my $action = shift @_) {
- # If we're setting the action, we need to weaken
- # the reference to not get caught in a loop
- Scalar::Util::weaken($action);
- return $self->_action($action);
+ my $self = shift;
+
+ if (@_) {
+ $self->_action(@_);
+
+ # weaken our circular reference
+ weaken $self->{_action};
}
- return $self->_action();
+ return $self->_action;
}
More information about the Jifty-commit
mailing list