in reply to Single accessor/mutator idiom in Perl5, Perl6 and Python

This is one of the idioms that i love the most. :) But i prefer to let Class::MethodMaker handle those details for me. ;)
#!/usr/bin/perl -l my $foo = Foo->new(givenName => 'original'); print $foo->givenName; $foo->givenName(42); print $foo->givenName; package Foo; use Class::MethodMaker new_hash_init => 'new', get_set => qw(givenName), ;
Yet another reason why i program in Perl and not Python - because no matter how pretty of a wheel Python makes, it's still a wheel that i have to reinvent just to Get Stuff Done® :/

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: Re: Single accessor/mutator idiom in Perl5, Perl6 and Python
by Anonymous Monk on Aug 19, 2003 at 20:34 UTC