[Kc] thinking about interpolation of accessors

Sterling Hanenkamp sterling at hanenkamp.com
Fri Feb 21 08:05:41 PST 2014


Maybe. Perl 6 does this by turning any { ... } into an eval interpolated
into the string. That might be cool to see implemented. I've never tried
hacking Perl internals, though.


On Thu, Feb 20, 2014 at 5:58 PM, David Nicol <davidnicol at gmail.com> wrote:

> yeah, me too, and that's what I recommended. That or assignment to a local
> scalar prior to the interpolation. Would a Perl 5.22 that allows properly
> configured objects to have their method calls interpolate be worth the
> trouble? That's the question.
>
>
>
> On Thu, Feb 20, 2014 at 4:02 PM, Sterling Hanenkamp <
> sterling at hanenkamp.com> wrote:
>
>> I have been known to use this:
>>
>> "the blurf field is @{[$self->blurf]}\n"
>>
>> It's ugly and wouldn't be something I use in production, but it does the
>> job when I'm in hurry.
>>
>
> _______________________________________________
> kc mailing list
> kc at pm.org
> http://mail.pm.org/mailman/listinfo/kc
>



-- 
Andrew Sterling Hanenkamp
sterling at hanenkamp.com
785.370.4454
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/kc/attachments/20140221/8730472a/attachment.html>


More information about the kc mailing list