[Jifty-commit] r1840 - jifty/trunk/lib/Jifty/Web

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Tue Aug 22 16:06:23 EDT 2006


Author: clkao
Date: Tue Aug 22 16:06:15 2006
New Revision: 1840

Modified:
   jifty/trunk/lib/Jifty/Web/Menu.pm

Log:
Kill Jifty::Web::Menu circular references.

Modified: jifty/trunk/lib/Jifty/Web/Menu.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Menu.pm	(original)
+++ jifty/trunk/lib/Jifty/Web/Menu.pm	Tue Aug 22 16:06:15 2006
@@ -2,6 +2,7 @@
 
 use base qw/Class::Accessor::Fast/;
 use URI;
+use Scalar::Util ();
 
 __PACKAGE__->mk_accessors(qw(label parent sort_order link target escape_label class));
 
@@ -111,6 +112,7 @@
                                                         escape_label => 1,
                                                         @_
                                                        });
+        Scalar::Util::weaken($self->{children}{$key}{parent});
         # Activate it
         if (my $url = $self->{children}{$key}->url and Jifty->web->request) {
             # XXX TODO cleanup for mod_perl


More information about the Jifty-commit mailing list