amw1 has asked for the wisdom of the Perl Monks concerning the following question:
# Define a page page <page key> { toolbar standard; }; # Define a standard toolbar toolbar standard { item { <item config> }; };
When I encounter toolbar standard; in the page config I want to create a blank hash key that will get filled later with the actual definition of toolbar standard. I've tried the following:
# Encounter the toolbar standard; line in the page config # Doesn't actually do anything $page->{<page_key>}{'toolbar'} = $toolbar->{'standard'}; # complains about standard getting re-defined $toolbar->{'standard'} ||= {}; # also tried undef and dummy value ins +tead of {} with no luck $page->{<page_key>}{'toolbar'} = $toolbar->{'standard'}; # $toolbar->{'standard'} is actually populated sometime after I proces +s $page->{<page_key>}
Is there any way to get the toolbar def in the page config point to a bucket that will be filled when the toolbar section is processed?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Defining a hash key for later use
by eieio (Pilgrim) on Feb 01, 2005 at 16:52 UTC | |
by amw1 (Friar) on Feb 01, 2005 at 16:56 UTC | |
|
Re: Defining a hash key for later use
by Animator (Hermit) on Feb 01, 2005 at 16:45 UTC | |
by amw1 (Friar) on Feb 01, 2005 at 16:51 UTC |