On Thu, 07 Sep 2006 03:29:02 -0400, Uri Guttman wrote:

>this line of my code grew to its present form which i find amusing. 
>
>       @{$self->{templates}}{ keys %{$tmpls} } =
>               map ref $_ eq 'SCALAR' ? \"${$_}" : \"$_", values %{$tmpls} ;
>
>discuss amongst yourselves. topics include: what does it do? wtf am i
>doing that? and general esthetics.

It makes a ref to a (stringified) copy of every scalar, or dereferenced
scalar ref.

Why would anyone take a copy instead of using an alias? Well, duh! To
make it safe to modify without touching the original, of course. Why you
are storing references instead of the string values, I don't know. It
won't save space.

BTW I assume this module is the subject of the slides at
<http://www.sysarch.com/tiny_template/slides/index.html>, no?

-- 
        Bart.

Reply via email to