Private flag is exclusive
Sebastian Riedel [Sun, 10 Apr 2005 23:06:19 +0000 (23:06 +0000)]
lib/Catalyst/Dispatcher.pm

index eb92137..fd99ba4 100644 (file)
@@ -231,6 +231,12 @@ sub set_action {
         elsif ( $attr =~ /^(Regex|Regexp)\((.+)\)$/i ) { $flags{regex} = $2 }
     }
 
+    if ( $flags{private} && ( keys %flags > 1 ) ) {
+        $c->log->error( 'Bad action definition "'
+              . join( ' ', @{$attrs} )
+              . qq/" for "$namespace->$method"/ );
+        return;
+    }
     return unless keys %flags;
 
     my $parent  = $c->tree;