[Bps-public-commit] r13892 - in Lorzy/trunk: .
sartak at bestpractical.com
sartak at bestpractical.com
Tue Jul 8 17:00:13 EDT 2008
Author: sartak
Date: Tue Jul 8 17:00:13 2008
New Revision: 13892
Modified:
Lorzy/trunk/ (props changed)
Lorzy/trunk/lib/Lorzy/Evaluator.pm
Log:
r63888 at onn: sartak | 2008-07-08 17:00:09 -0400
Activate the parameter checking in apply_script (which was disabled for using a key Params::Validate didn't understand. It should use Params::Validate. :))
Modified: Lorzy/trunk/lib/Lorzy/Evaluator.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Evaluator.pm (original)
+++ Lorzy/trunk/lib/Lorzy/Evaluator.pm Tue Jul 8 17:00:13 2008
@@ -4,7 +4,7 @@
use Lorzy::EvaluatorResult;
use Lorzy::Expression;
-use Params::Validate;
+use Params::Validate qw/validate validate_pos HASHREF/;
has result => (
is => 'ro',
@@ -114,11 +114,10 @@
# self, a lambda, any number of positional params. (to be replaced with a params object?)
my ($self, $lambda, $args) = validate_pos(
@_,
- { isa => 'Lorzy::Evaluator' },
- { ISA => 'Lorzy::Lambda' },
- { ISA => "HASHREF" }
+ { isa => 'Lorzy::Evaluator' },
+ { isa => 'Lorzy::Lambda' },
+ { type => HASHREF },
);
- confess "Invalid lambda passed to apply_script" unless $lambda;
my $ret = $lambda->apply($self => $args);
$self->result->value($ret);
More information about the Bps-public-commit
mailing list