Alias for action attributes
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine.pm
index 0513615..8d84e85 100644 (file)
@@ -444,8 +444,8 @@ sub prepare {
     }
     $c->prepare_request($r);
     $c->prepare_path;
-    $c->prepare_cookies;
     $c->prepare_headers;
+    $c->prepare_cookies;
     $c->prepare_connection;
     my $method   = $c->req->method   || '';
     my $path     = $c->req->path     || '';
@@ -638,11 +638,11 @@ sub set_action {
     my %flags;
 
     for my $attr ( @{$attrs} ) {
-        if    ( $attr =~ /^Local$/ )         { $flags{local}++ }
-        elsif ( $attr =~ /^Global$/ )        { $flags{global}++ }
-        elsif ( $attr =~ /^Path\((.+)\)$/i ) { $flags{path} = $1 }
-        elsif ( $attr =~ /^Private$/i )      { $flags{private}++ }
-        elsif ( $attr =~ /Regex\((.+)\)$/i ) { $flags{regex} = $1 }
+        if    ( $attr =~ /^(Local|Relative)$/ )        { $flags{local}++    } 
+        elsif ( $attr =~ /^(Global|Absolute)$/ )       { $flags{global}++   }
+        elsif ( $attr =~ /^Path\((.+)\)$/i )           { $flags{path} = $1  }
+        elsif ( $attr =~ /^Private$/i )                { $flags{private}++  }
+        elsif ( $attr =~ /^(Regex|Regexp)\((.+)\)$/i ) { $flags{regex} = $2 }
     }
 
     return unless keys %flags;