1Mojolicious::Guides(3)User Contributed Perl DocumentationMojolicious::Guides(3)
2
3
4

NAME

6       Mojolicious::Guides - The Mojolicious Guide to the Galaxy
7

DON'T PANIC!

9       The Mojolicious <https://mojolicious.org> documentation is structured
10       into three parts. The "TUTORIAL" everyone starts with, the "GUIDES"
11       that explain all major features in detail, and the class "REFERENCE"
12       listing all available APIs.
13
14       Some parts of the documentation only use the Mojolicious::Lite micro
15       web framework for examples, but that's merely a convenience for the
16       reader. Almost all features are exactly the same for full Mojolicious
17       applications.
18

BASICS

20       Learning Perl
21         If you are new to Perl, we recommend Learn Perl in 2 hours 30 minutes
22         <http://qntm.org/files/perl/perl.html> for a quick introduction, or
23         the Modern Perl book <https://pragprog.com/book/swperl/modern-perl-
24         fourth-edition>, freely available in many formats. Both are excellent
25         introductions to the language. For more books and documentation,
26         check out learn.perl.org <http://learn.perl.org/>.
27
28       Learning Web Technologies
29         All web development starts with HTML, CSS and JavaScript, to learn
30         the basics we recommend the Mozilla Developer Network
31         <https://developer.mozilla.org/en-US/docs/Web>. And if you want to
32         know more about how browsers and web servers actually communicate,
33         there's also a very nice introduction to HTTP
34         <https://developer.mozilla.org/en-US/docs/Web/HTTP>.
35

CONVENTIONS

37       Modern Perl
38         Mojolicious uses a modern subset of Perl exclusively, and therefore
39         all documentation assumes that strict, warnings, utf8 and Perl 5.10
40         features are enabled, even if examples don't specifically mention it.
41
42           use strict;
43           use warnings;
44           use utf8;
45           use feature ':5.10';
46
47         Some modules, like Mojo::Base and Mojolicious::Lite, will enable them
48         for you automatically, whenever they are used.
49
50       Variable names
51         For brevity and clarity, example variables will reflect the type of
52         data the API uses. For instance, $bytes or $chars to distinguish
53         whether it is encoded bytes or decoded characters in a Perl string,
54         $bool if the value just indicates true or false, $c to denote a
55         Mojolicious::Controller object, or $app to denote the application
56         object.
57

TUTORIAL

59       Mojolicious::Guides::Tutorial
60         A fast and fun way to get started developing web applications with
61         Mojolicious. The tutorial introduces the Mojolicious::Lite micro web
62         framework, which is only a thin wrapper around the full web
63         framework. The simplified notation introduced in the tutorial is
64         commonly used throughout the guides and is therefore considered a
65         prerequisite, you should definitely take a look!
66

GUIDES

68       Mojolicious::Guides::Growing
69         Starting a Mojolicious::Lite prototype from scratch and growing it
70         into a well-structured Mojolicious application.
71
72       Mojolicious::Guides::Routing
73         Simple and fun introduction to the Mojolicious router.
74
75       Mojolicious::Guides::Rendering
76         Generating content with the Mojolicious renderer.
77
78       Mojolicious::Guides::Testing
79         Powerful yet elegant testing techniques and tools for Mojolicious and
80         other web applications.
81
82       Mojolicious::Guides::Cookbook
83         Cooking with Mojolicious, recipes for every taste.
84
85       Mojolicious::Guides::Contributing
86         Become a part of the ongoing Mojolicious development.
87
88       Mojolicious::Guides::FAQ
89         Answers to the most frequently asked questions.
90

HIGHLIGHTS

92       Mojolicious and Mojolicious::Lite are the sum of many parts, built on
93       top of the Mojo web development toolkit. Small building blocks that can
94       be used independently for all kinds of applications, these are the most
95       prominent ones.
96
97       Mojo::UserAgent
98         Full featured non-blocking I/O HTTP and WebSocket user agent.
99
100       Mojo::DOM
101         Very fun and minimalistic HTML/XML DOM parser with CSS selector
102         support.
103
104       Mojo::JSON
105         Minimalistic JSON implementation that just works.
106
107       Mojo::Server::Daemon
108         Full featured, highly portable non-blocking I/O HTTP and WebSocket
109         server, with self-restart support through Mojo::Server::Morbo,
110         perfect for development and testing.
111
112       Mojo::Server::Prefork
113         Full featured, UNIX optimized, preforking non-blocking I/O HTTP and
114         WebSocket server with support for zero downtime software upgrades
115         (hot deployment) through Mojo::Server::Hypnotoad.
116
117       Mojo::Server::CGI, Mojo::Server::PSGI
118         Transparent CGI and PSGI support out of the box.
119
120       Mojo::IOLoop
121         A minimalistic event loop with support for multiple reactor backends.
122
123       Mojo::Template
124         Very Perl-ish and minimalistic template system.
125
126       Test::Mojo
127         Testing toolkit for web applications.
128
129       ojo
130         Fun one-liners using everything above.
131

SPIN-OFFS

133       These modules are not part of the Mojolicious distribution, but have
134       been designed to be used with it and are being developed under the same
135       umbrella.
136
137       Mojo::Pg
138         A tiny wrapper around DBD::Pg that makes PostgreSQL
139         <http://www.postgresql.org> a lot of fun to use with Mojolicious.
140         Perform queries blocking and non-blocking, use all SQL features
141         <https://www.postgresql.org/docs/current/static/sql.html> PostgreSQL
142         has to offer, generate CRUD queries from data structures, manage your
143         database schema with migrations and build scalable real-time web
144         applications with the publish/subscribe pattern.
145
146         And it comes with two great example applications
147         <https://github.com/mojolicious/mojo-pg/tree/master/examples/> you
148         can use for inspiration. The minimal chat
149         <https://github.com/mojolicious/mojo-pg/tree/master/examples/chat.pl>
150         application will show you how to scale WebSockets to multiple
151         servers, and the well-structured blog
152         <https://github.com/mojolicious/mojo-pg/tree/master/examples/blog>
153         application how to apply the MVC design pattern in practice.
154
155       Minion
156         A full featured job queue for Mojolicious with support for multiple
157         backends (such as PostgreSQL <http://www.postgresql.org>). Job queues
158         allow you to process time and/or computationally intensive tasks in
159         background processes, outside of the request/response lifecycle.
160         Among those tasks you'll commonly find image resizing, spam
161         filtering, HTTP downloads, building tarballs, warming caches and
162         basically everything else you can imagine that's not super fast.
163
164         And it comes with a great example application you can use for
165         inspiration. The link checker
166         <https://github.com/mojolicious/minion/tree/master/examples/linkcheck>
167         will show you how to integrate background jobs into well-structured
168         Mojolicious applications.
169

REFERENCE

171       This is the class hierarchy of the Mojolicious distribution.
172
173       · Mojo
174
175       · Mojo::Base
176
177         · Mojolicious
178
179           · Mojo::HelloWorld
180
181           · Mojolicious::Lite
182
183         · Mojo::Cache
184
185         · Mojo::Cookie
186
187           · Mojo::Cookie::Request
188
189           · Mojo::Cookie::Response
190
191         · Mojo::DOM::CSS
192
193         · Mojo::DOM::HTML
194
195         · Mojo::Date
196
197         · Mojo::EventEmitter
198
199           · Mojo::Asset
200
201             · Mojo::Asset::File
202
203             · Mojo::Asset::Memory
204
205           · Mojo::Content
206
207             · Mojo::Content::MultiPart
208
209             · Mojo::Content::Single
210
211           · Mojo::IOLoop
212
213           · Mojo::IOLoop::Client
214
215           · Mojo::IOLoop::Server
216
217           · Mojo::IOLoop::Stream
218
219           · Mojo::IOLoop::Subprocess
220
221           · Mojo::IOLoop::TLS
222
223           · Mojo::Log
224
225           · Mojo::Message
226
227             · Mojo::Message::Request
228
229             · Mojo::Message::Response
230
231           · Mojo::Reactor
232
233             · Mojo::Reactor::Poll
234
235               · Mojo::Reactor::EV
236
237           · Mojo::Server
238
239             · Mojo::Server::CGI
240
241             · Mojo::Server::Daemon
242
243               · Mojo::Server::Prefork
244
245             · Mojo::Server::PSGI
246
247           · Mojo::Transaction
248
249             · Mojo::Transaction::HTTP
250
251             · Mojo::Transaction::WebSocket
252
253           · Mojo::UserAgent
254
255           · Mojolicious::Plugins
256
257         · Mojo::Exception
258
259         · Mojo::Headers
260
261         · Mojo::JSON::Pointer
262
263         · Mojo::Parameters
264
265         · Mojo::Path
266
267         · Mojo::Promise
268
269           · Mojo::IOLoop::Delay
270
271         · Mojo::Server::Hypnotoad
272
273         · Mojo::Server::Morbo
274
275         · Mojo::Server::Morbo::Backend
276
277           · Mojo::Server::Morbo::Backend::Poll
278
279         · Mojo::Template
280
281         · Mojo::URL
282
283         · Mojo::Upload
284
285         · Mojo::UserAgent::CookieJar
286
287         · Mojo::UserAgent::Proxy
288
289         · Mojo::UserAgent::Server
290
291         · Mojo::UserAgent::Transactor
292
293         · Mojolicious::Command
294
295           · Mojolicious::Command::cgi
296
297           · Mojolicious::Command::daemon
298
299           · Mojolicious::Command::eval
300
301           · Mojolicious::Command::get
302
303           · Mojolicious::Command::prefork
304
305           · Mojolicious::Command::psgi
306
307           · Mojolicious::Command::routes
308
309           · Mojolicious::Command::version
310
311           · Mojolicious::Command::Author::cpanify
312
313           · Mojolicious::Command::Author::generate::app
314
315           · Mojolicious::Command::Author::generate::lite_app
316
317           · Mojolicious::Command::Author::generate::makefile
318
319           · Mojolicious::Command::Author::generate::plugin
320
321           · Mojolicious::Command::Author::inflate
322
323           · Mojolicious::Commands
324
325             · Mojolicious::Command::Author::generate
326
327         · Mojolicious::Controller
328
329         · Mojolicious::Plugin
330
331           · Mojolicious::Plugin::Config
332
333             · Mojolicious::Plugin::JSONConfig
334
335           · Mojolicious::Plugin::DefaultHelpers
336
337           · Mojolicious::Plugin::EPLRenderer
338
339             · Mojolicious::Plugin::EPRenderer
340
341           · Mojolicious::Plugin::HeaderCondition
342
343           · Mojolicious::Plugin::Mount
344
345           · Mojolicious::Plugin::TagHelpers
346
347         · Mojolicious::Renderer
348
349         · Mojolicious::Routes::Match
350
351         · Mojolicious::Routes::Pattern
352
353         · Mojolicious::Routes::Route
354
355           · Mojolicious::Routes
356
357         · Mojolicious::Sessions
358
359         · Mojolicious::Static
360
361         · Mojolicious::Types
362
363         · Mojolicious::Validator
364
365         · Mojolicious::Validator::Validation
366
367         · Test::Mojo
368
369       · Mojo::ByteStream
370
371       · Mojo::Collection
372
373       · Mojo::DynamicMethods
374
375       · Mojo::DOM
376
377       · Mojo::File
378
379         · Mojo::Home
380
381       · Mojo::JSON
382
383       · Mojo::Loader
384
385       · Mojo::Util
386
387       · Mojo::WebSocket
388
389       · ojo
390

MORE

392       A lot more documentation and examples by many different authors can be
393       found in the Mojolicious wiki
394       <http://github.com/mojolicious/mojo/wiki>.
395

SUPPORT

397       If you have any questions the documentation might not yet answer, don't
398       hesitate to ask on the mailing list
399       <http://groups.google.com/group/mojolicious> or the official IRC
400       channel "#mojo" on "irc.freenode.net" (chat now!
401       <https://kiwiirc.com/nextclient/#irc://irc.freenode.net/mojo?nick=guest-?>).
402
403
404
405perl v5.28.0                      2018-11-01            Mojolicious::Guides(3)
Impressum