There's more than one way to do things | |
PerlMonks |
Obfuscated accessorby bluescreen (Friar) |
on Jan 27, 2009 at 20:16 UTC ( [id://739329]=CUFP: print w/replies, xml ) | Need Help?? |
I was thinking if there any chance to write an accessor in just one line, and I came up with the following code. Of course I wouldn't use in a real project because its unreadable but it might worth sharing. The good thing is just replacing subroutine name creates a new accessor.
Back to
Cool Uses for Perl
|
|