AidanLee has asked for the wisdom of the Perl Monks concerning the following question:
but that got to be a nightmare in remembering to dereference it everywhere. So I'm now wondering if there's a way to tag the reference in such a way as to be able to test for it's 'activeness'. Scalar::Util's weaken() function would be a great metaphor for this (testing with the isweak() function) but I can't afford to have weaken's intended effect as a side effect.#active: push @{$object->{related}}, $object2; #inactive @{$object->{related}}, \$object2;
[% FOREACH related_obj = object.related %] ... [% END %]
but if anyone has any other interesting approaches to this I'd be glad to hear them. The simpler for the template authors, the better.[% IF object.related.isActive( related_obj ) %]...[% END %]
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: adding meta-data to references-as-graph-arcs
by chromatic (Archbishop) on Feb 15, 2004 at 07:02 UTC | |
Re: adding meta-data to references-as-graph-arcs
by kvale (Monsignor) on Feb 15, 2004 at 06:24 UTC |