[Jifty-commit] r2264 - jifty/trunk/lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sat Dec 2 16:25:51 EST 2006


Author: dpavlin
Date: Sat Dec  2 16:25:49 2006
New Revision: 2264

Modified:
   jifty/trunk/lib/Jifty/Action.pm

Log:
Jifty::Manual::Actions include example with available are defer { ... } syntax which
doesn't work because ref on variables deferred with Scalar::Defer return 0 instead of ARRAY

Modified: jifty/trunk/lib/Jifty/Action.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action.pm	(original)
+++ jifty/trunk/lib/Jifty/Action.pm	Sat Dec  2 16:25:49 2006
@@ -982,7 +982,8 @@
     my $type = shift;
 
     my $vv_orig = $self->arguments->{$field}{$type .'_values'};
-    return $vv_orig unless ref $vv_orig eq 'ARRAY';
+    # available are defer { } creates defered value which ref is 0
+    return $vv_orig unless ( ref $vv_orig eq 'ARRAY' || ref $vv_orig eq 0 );
 
     my $vv = [];
 


More information about the Jifty-commit mailing list