Skip to content

HTTPS clone URL

Subversion checkout URL

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