so if there were lisp-like macros available in perl, my sugar example
might be something like the following?
macro hashkeyaccessor(fieldname) { sub fieldname { $_[0]->{fieldname}} };
hashkeyaccessor $_ for qw/FIELD NAMES GO HERE .../;
and I would save the trickiness of getting the interpolation level
right. That is
imagining a CPP macro... the LISP idea on macros is that the template
would be created at the optree level rather than the source level, but its still
a template and replacement kind of deal. What am I missing?