A common Perl newbie error is to try to use an object accessor method in an
interpolative context and expect to get the value, like so

     DEBUG and print "the blurf field is $self->blurf\n";

which (of course) doesn't work, because blurf is a method call, not a
syncactic container access like $self->{blurf}.

An extension to Perl that would allow that to work would have to hook back
into the interpolation process.

Anyone for tinkering under perl's hood towards defining a package attribute
that would indicate that method syntax interpolates?



-- 

"Sing, cuckoo, sing.
Death is a-comin' in.
Sing, cuckoo, sing.
Death is a-comin' in" -- Tuli Kupferberg
_______________________________________________
kc mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/kc

Reply via email to