On 5/26/07, Peter Michaux <[EMAIL PROTECTED]> wrote:
Thanks for the suggestions. I just want to keep a little utility
module like this plain Perl without any dependencies. Just because I
think Perl if funny looking doesn't affect whether or not I'll be
using it. With my first Perl adventure I did notice that it is very
slow to type $s->{a} instead of s.a like in JavaScript.

I don't really think using Moose would fit this specific example, but
since you seem to be developing using Perl, it might be a nice
addition to your projects.

If you're using objects instead of hashes it's pretty common to use
accessor methods (generated using Class::Accessor or some other
module). So, instead of $obj->{property}, you can use $obj->property,
which is a bit cleaner.

Perl 6 will take care of making that: obj.property

I also just remembered that there's actually a module called Acme::Dot
for Perl5 which provides dotted syntax for Perl5 but, as the Acme
namespace indicates, it's not really meant to be used in any serious
way. But it's nevertheless interesting to see how the language can be
flexible, though.

-Nilson Santos F. Jr.

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to