Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Technique for building arguments from function name?by AnomalousMonk (Archbishop) |
on Dec 05, 2017 at 02:00 UTC ( [id://1204913]=note: print w/replies, xml ) | Need Help?? |
Just for the heck of it (and I also don't recommend it), a prototype approach (they've gotta be good for something): The advantage of the * prototype is that you can use a "naked" tag string. You save an underscore at the cost of a comma and an optional space; a wash, I'd say. It even does minimal validation (but something like print html(qw(b now is the time)); is accepted with an unenlightening warning). Update: Added strike example to show multicharacter tag. Give a man a fish: <%-{-{-{-<
In Section
Seekers of Perl Wisdom
|
|