04 September 2008
This post may be outdated due to it was written on 2008. The links may be broken. The code may be not working anymore. Leave comments if needed.
finally I wrote my first Moose script.
mainly I want to write a MooseX::Schwartz if I have enough time.

Moose is very powerful.
I want a common function like set a flag to debug, besides that, we can define debug logger sub ourself.
something like:
->verbose(1);
->verbose(0);
->verbose( sub {
my $msg = shift;
$msg =~ s/\s+$//;
print STDERR "[CUS] $msg\n";
} );
# then call ->debug depends on ->verbose.

final code is here:
http://fayland.googlecode.com/svn/trunk/script/learn_moose/007_subtype.pl

I'm not a Moose guru, but Moose sounds pretty exciting!


blog comments powered by Disqus