make constant methods mockable

This commit is contained in:
Graham Knop 2010-03-19 10:37:25 -05:00
parent a484fb126d
commit e64345af5e

View file

@ -58,7 +58,7 @@ BEGIN {
my $meta = Class::MOP::Class->initialize(__PACKAGE__);
for my $sub (keys %paths) {
my $path = $paths{$sub};
$meta->add_method( $sub, sub () { $path } );
$meta->add_method( $sub, sub { $path } );
}
}