[Bps-public-commit] r13872 - in Lorzy/trunk: lib lib/Lorzy/Lambda

sartak at bestpractical.com sartak at bestpractical.com
Tue Jul 8 13:28:06 EDT 2008


Author: sartak
Date: Tue Jul  8 13:28:02 2008
New Revision: 13872

Modified:
   Lorzy/trunk/   (props changed)
   Lorzy/trunk/lib/Lorzy.pm
   Lorzy/trunk/lib/Lorzy/Lambda/Native.pm

Log:
 r63851 at onn:  sartak | 2008-07-08 13:27:58 -0400
 Clean up Lorzy::Lambda::Native


Modified: Lorzy/trunk/lib/Lorzy.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy.pm	(original)
+++ Lorzy/trunk/lib/Lorzy.pm	Tue Jul  8 13:28:02 2008
@@ -1,5 +1,5 @@
 
-=head1 NAME 
+=head1 NAME
 
 Lorzy - The Pinglin Interactive Evaluator
 

Modified: Lorzy/trunk/lib/Lorzy/Lambda/Native.pm
==============================================================================
--- Lorzy/trunk/lib/Lorzy/Lambda/Native.pm	(original)
+++ Lorzy/trunk/lib/Lorzy/Lambda/Native.pm	Tue Jul  8 13:28:02 2008
@@ -1,24 +1,19 @@
-
 package Lorzy::Lambda::Native;
-use Moose; 
-use YAML;
-use Scalar::Defer;
+use Moose;
 extends 'Lorzy::Lambda';
 
 has body => (
-    is => 'ro',
-#    isa => 'CODE',
+    is  => 'ro',
+    isa => 'CodeRef',
 );
 
-
-
 sub apply {
-    my ( $self, $evaluator, $args ) = @_;
-
+    my ($self, $evaluator, $args) = @_;
     $self->validate_args_or_die($args);
-    my $r = $self->body->( {map { $_ => $args->{$_}->evaluate($evaluator) } keys %$args });
+    my %args = map { $_ => $args->{$_}->evaluate($evaluator) } keys %$args;
+    my $r = $self->body->(\%args);
     return $r;
 }
 
-
 1;
+



More information about the Bps-public-commit mailing list