[Templates] Assembling a list of css/js/meta tags for WRAPPERs
Randal L. Schwartz
merlyn@stonehenge.com
02 Aug 2006 19:51:13 -0700
>>>>> "Bill" == Bill Moseley <moseley@hank.org> writes:
Bill> page.style_sheet = [];
Bill> MACRO include_style_sheet( name ) BLOCK;
Bill> css_found = 0;
Bill> FOR css = page.style_sheet;
Bill> IF css == name;
Bill> css_found = 1;
Bill> LAST;
Bill> END;
Bill> END;
Bill> page.style_sheet.push( name ) UNLESS css_found;
Bill> END;
Why are you using an array when a hash would be so much easier?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!