Modified:
trunk/CPAN/MooseX-Dumper/Changes
trunk/CPAN/MooseX-Dumper/lib/MooseX/Dumper.pm
Log:
use the return coderef instead of a eval string (thanks, miyagawa)
Modified: trunk/CPAN/MooseX-Dumper/Changes
==============================================================================
--- trunk/CPAN/MooseX-Dumper/Changes (original)
+++ trunk/CPAN/MooseX-Dumper/Changes Sun Feb 22 23:06:16 2009
@@ -1,5 +1,8 @@
Revision history for MooseX-Dumper
+0.02 2009.02.23
+ use the return coderef instead of a eval string (thanks, miyagawa)
+
0.01 Date/time
First version, released on an unsuspecting world.
Modified: trunk/CPAN/MooseX-Dumper/lib/MooseX/Dumper.pm
==============================================================================
--- trunk/CPAN/MooseX-Dumper/lib/MooseX/Dumper.pm (original)
+++ trunk/CPAN/MooseX-Dumper/lib/MooseX/Dumper.pm Sun Feb 22 23:06:16 2009
@@ -2,7 +2,7 @@
use Moose;
-our $VERSION = '0.01';
+our $VERSION = '0.02';
our $AUTHORITY = 'cpan:FAYLAND';
with 'MooseX::Traits';
@@ -23,10 +23,8 @@
# Data::Dump 'dump'
foreach my $meth ( 'Dumper', 'dump', 'Dump' ) {
- if ( $self->dumper_class->can($meth) ) {
- my $class = $self->dumper_class;
- my $val = eval "${class}::${meth}(\@_)"; # no critic
- return $val;
+ if ( my $dump_code = $self->dumper_class->can($meth) ) {
+ return $dump_code->(@_);
}
}
}