23 February 2009
This post may be outdated due to it was written on 2009. The links may be broken. The code may be not working anymore. Leave comments if needed.
well, I just released the MooseX::Dumper today.

miyagawa on irc.perl.org #moose just told me that ->can() returns the coderef, so that I don't need to do follows:
        if ( $self->dumper_class->can($meth) ) {
my $class = $self->dumper_class;
my $val = eval "${class}::${meth}(\@_)"; # no critic
return $val;
}
Instead, just do:
        if ( my $dump_code = $self->dumper_class->can($meth) ) {
return $dump_code->(@_);
}
Yup, much more simpler and cleaner.

Thanks, miyagawa. 0.02 is on the way. :)


blog comments powered by Disqus