[Jifty-commit] r5081 - in jifty/trunk: lib/Jifty/Plugin/REST

Jifty commits jifty-commit at lists.jifty.org
Fri Feb 8 16:42:53 EST 2008


Author: sartak
Date: Fri Feb  8 16:42:52 2008
New Revision: 5081

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm

Log:
 r51679 at onn:  sartak | 2008-02-08 16:41:47 -0500
 Fix the isa check in REST's _resolve.  We instead want to fail if the class we check isn't a $base.


Modified: jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm	Fri Feb  8 16:42:52 2008
@@ -397,12 +397,10 @@
     # heathen names to be Perl-style
     $name =~ s/\./::/g;
 
-    return $name if $name->isa($base);
-
     my $re = qr/(?:^|::)\Q$name\E$/i;
 
     foreach my $cls (@_) {
-        return $cls if $cls =~ $re;
+        return $cls if $cls =~ $re && $cls->isa($base);
     }
 
     abort(404);


More information about the Jifty-commit mailing list