Make Moose components collaberate with non-Moose Catalyst
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Priorities.pm
CommitLineData
6ea96b03 1package TestApp::Controller::Priorities;
2
3use strict;
4use base 'Catalyst::Base';
5
6#
7# Regex vs. Local
8#
9
10sub re_vs_loc_re :Regex('/priorities/re_vs_loc') { $_[1]->res->body( 'regex' ) }
11sub re_vs_loc :Local { $_[1]->res->body( 'local' ) }
12
13#
14# Regex vs. LocalRegex
15#
16
17sub re_vs_locre_locre :LocalRegex('re_vs_(locre)') { $_[1]->res->body( 'local_regex' ) }
18sub re_vs_locre_re :Regex('/priorities/re_vs_locre') { $_[1]->res->body( 'regex' ) }
19
20#
21# Regex vs. Path
22#
23
24sub re_vs_path_path :Path('/priorities/re_vs_path') { $_[1]->res->body( 'path' ) }
25sub re_vs_path_re :Regex('/priorities/re_vs_path') { $_[1]->res->body( 'regex' ) }
26
27#
28# Local vs. LocalRegex
29#
30
31sub loc_vs_locre_locre :LocalRegex('loc_vs_locre') { $_[1]->res->body( 'local_regex' ) }
32sub loc_vs_locre :Local { $_[1]->res->body( 'local' ) }
33
34#
35# Local vs. Path (depends on definition order)
36#
37
38sub loc_vs_path1_loc :Path('/priorities/loc_vs_path1') { $_[1]->res->body( 'path' ) }
39sub loc_vs_path1 :Local { $_[1]->res->body( 'local' ) }
40
41sub loc_vs_path2 :Local { $_[1]->res->body( 'local' ) }
42sub loc_vs_path2_loc :Path('/priorities/loc_vs_path2') { $_[1]->res->body( 'path' ) }
43
44#
45# Path vs. LocalRegex
46#
47
48sub path_vs_locre_locre :LocalRegex('path_vs_(locre)') { $_[1]->res->body( 'local_regex' ) }
49sub path_vs_locre_path :Path('/priorities/path_vs_locre') { $_[1]->res->body( 'path' ) }
50
51#
52# Regex vs. index (has sub controller)
53#
54
55sub re_vs_idx :Regex('/priorities/re_vs_index') { $_[1]->res->body( 'regex' ) }
56
57#
58# Local vs. index (has sub controller)
59#
60
61sub loc_vs_index :Local { $_[1]->res->body( 'local' ) }
62
63#
64# LocalRegex vs. index (has sub controller)
65#
66
67sub locre_vs_idx :LocalRegex('locre_vs_index') { $_[1]->res->body( 'local_regex' ) }
68
69#
70# Path vs. index (has sub controller)
71#
72
73sub path_vs_idx :Path('/priorities/path_vs_index') { $_[1]->res->body( 'path' ) }
74
751;