public
Description: A Camping-inspired Web Microframework for Perl
Homepage: http://groups.google.com/group/squatting-framework
Clone URL: git://github.com/beppu/squatting.git
Click here to lend your support to: squatting and make a donation at www.pledgie.com !
squatting / README
100644 144 lines (103 sloc) 6.182 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
 
 
                                                                  -+m
                                                                 .%- ..
  [ Squatting ] . m*#-+
  A Camping-inspired Web Microframework for Perl m+*##+m.
                                                          ...- m#*#%-..
                                                        --.. +mm###-+-.
                                                      ..- m..*#####*m++
                                                   .--+.-m#m+.%+-m###+
                                                  .-m..###+...% m#m-##% .
                                                     +%+.. -++.+ m--#-+
                                                  .. --..%*-%- --+#.m
                                                   - - -.--+# .. +#m+
                                                        ..#-+%. +.#..
                                           . . . .%#-... .-+.-
                                   . -.+m+-. .. .-.++#.*-... . .
                           ..- .+. ..+..+---+%---.--.--#m#+.. +
                        .-. m .. -.m++m####%###-##%.++*%++ m .
                      . +. m-- *##*#+###..-m+m.++.#-####-%-m. ..
                      -m#--%###-m+- --+%m..--. - .-*%####% ..-. -.
                   -...-*##%m+.+-+.++-m#+-. .. . +.+%%-#m..m#%m+..-.
                   -..*#**m.-.+..-.m+-##+.- +m-+*%- %-- %##-
                 ...++*++.. . . +m##*-. -.%m+ + -.-++%+-
                . ++###.%.-- . . *m+##%%. .-%-#- . ...#...
                 ..%*+m . + m+####%.. .-+%#+- .-#--
                 -.#mm.. --.- +%#-m#%% ...%+##%+ .+..\-
                .+mm%+ .. ..m-m.+%%+m**+.. --.##%m--. + #-.
                .--%%. . m .#++ %-- +mm-. ...m##m-.+ -+*--
                 +-#+- . .##+.. +..m .m-#%#%-- -.##-.
               .%.**+. ...m#%..- .. ...# m . +-%#.%+ . %#%..+
               -+##%.+.. #-. -. .m+..m -#%mm .--**++
               .-%.*m+-...mm+ . .+ +- -m-+. ..*#.. .
               .-+*m#%m**++-+ .. -##.%%.- - ..##+-.
               - +-*%##%+mm--+ . .#m-m- - -+.m.##-+.
                .. m*##*#*%-m+- - . . .m.+.m .. m%+.*-% -
                ...+##m%####m-+m- -. .. ..- ++.. . +.. +%-###m-%.
                 ..%#-%#++%####.+.m-+. . +m#+#+%.. . -#*###m.--
                 . %-mm ++-mm+**##%mm. - .+mm#+*.+--.#/##-+-+m .
                ..+.# - +-. m%m#m#*+.-..+##*###%m#%#% .--- - . .
                .-m#m. . . ..m+...#%m--+-*#+######.%+.. .+
              ..m-#%. . ..- .+-- - .---.-**-+--...
             .+.#m#m- .. . . - -..- ..*
            . +-##-+. . -- . ..
             .+##m%+
              .%.---
             .. .
              ...
 
  http://en.wikipedia.org/wiki/Squatting
  http://github.com/beppu/squatting/tree/master
 
 
                                  RANDOM NOTES
                                  ============
 
              There is an example application in the eg/ directory
                               called "Example".
 
           This is how you currently run this squatting application:
 
                                     cd eg/
                               squatting Example
 
              (Example.pm needs to be discoverable through @INC.)
 
                                    - -*- -
 
                     If you're familiar w/ the Camping API,
                      the Squatting API will feel similar.
 
                                    - -*- -
 
     Example::Controllers is the package that contains all the controllers.
 
                                    - -*- -
 
                     Controllers are objects (not classes)
                  that are constructed using the C() function.
 
                                    - -*- -
 
                      Controllers represent HTTP Resources
                           that support HTTP Methods
                             like GET and POST with
                               the object methods
                                 get and post.
 
                        This was the genius of Camping.
                        I can't think of a better way to
                          express RESTful controllers.
 
                                    - -*- -
 
           Example::Views is the package that contains all the views.
 
                                    - -*- -
 
                      Views are also objects (not classes)
                  that are constructed using the V() function.
 
                                    - -*- -
 
               The methods of a view are thought of as templates.
 
                                    - -*- -
 
                     The responsibility of a template is to
                       1) take a hashref of variables and
                              2) return a string.
 
                  You may use any templating system you want,
                              or even none at all.
 
                                    - -*- -
 
                You may define a layout template called 'layout'
         which will be used to wrap the content of any other template.
            If you don't want your template to be wrapped, you have
                     to give it a name with a '_' in front.
 
                                    - -*- -
 
           You may define a generic template called '_' for use when
                      a specific template can't be found.
 
                                    - -*- -
 
                          You may have multiple views.
 
                                    - -*- -
 
                The first view you define is your default view.
 
                                    - -*- -
 
               The optional 2nd parameter to the render() method
           lets you specify which view you want to use. For example,
 
                        $self->render('profile', 'json')
 
           would render the 'profile' template using the 'json' view.