[Jifty-commit] r852 - in jifty/trunk: lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Apr 12 23:15:19 EDT 2006


Author: jesse
Date: Wed Apr 12 23:15:19 2006
New Revision: 852

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/Makefile.PL
   jifty/trunk/lib/Jifty/Object.pm

Log:
 r11604 at hualien:  jesse | 2006-04-12 23:11:34 -0400
 * Removed an extra eval from J::O->_get_current_user


Modified: jifty/trunk/Makefile.PL
==============================================================================
--- jifty/trunk/Makefile.PL	(original)
+++ jifty/trunk/Makefile.PL	Wed Apr 12 23:15:19 2006
@@ -7,7 +7,7 @@
 requires('App::CLI' => 0.03 ); # App::CLI::Command::Help App::CLI::Command
 requires('Cache::Cache'); #Cache::FileCache
 requires('Calendar::Simple');
-requires('Class::Accessor');
+requires('Class::Accessor'); # Class::Accessor::Fast
 requires('Class::Container');
 requires('Clone');
 requires('Compress::Zlib');

Modified: jifty/trunk/lib/Jifty/Object.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Object.pm	(original)
+++ jifty/trunk/lib/Jifty/Object.pm	Wed Apr 12 23:15:19 2006
@@ -72,23 +72,24 @@
         package DB;
 
         # get the caller in array context to populate @DB::args
-        while (  not $self->current_user and $depth < 10) {
+        while ( not $self->current_user and $depth < 10 ) {
+
             #local @DB::args;
-            my ($package, $filename, $line, $subroutine, $hasargs,
-                               $wantarray, $evaltext, $is_require, $hints, $bitmask)= caller( $depth++ );
-            my $caller_self      = $DB::args[0];
-            next unless (ref($caller_self)); #skip class methods;
-            next if ($caller_self eq $self);
-            next unless $caller_self->can('current_user');
-
-            eval {
-                if ( $caller_self->current_user and defined $caller_self->current_user->id) {
-                    $self->current_user($caller_self->current_user());
-                }
-            };
-            # Skip all that error checking
-        } 
+            my ($package,   $filename, $line,       $subroutine, $hasargs,
+                $wantarray, $evaltext, $is_require, $hints,      $bitmask
+                )
+                = caller( $depth++ );
+            my $caller_self = $DB::args[0];
+            next unless ( ref($caller_self) );    #skip class methods;
+            next if ( $caller_self eq $self );
+            next
+                unless ( $caller_self->can('current_user')
+                and $caller_self->current_user
+                and defined $caller_self->current_user->id );
+            $self->current_user( $caller_self->current_user() );
+        }
     };
+
     # If we found something, return it
     return $self->current_user if $self->current_user;
 


More information about the Jifty-commit mailing list