This file is indexed.

/usr/share/perl5/Mojolicious/Guides/Cheatsheet.pod is in libmojolicious-perl 2.23-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
=head1 NAME

Mojolicious::Guides::Cheatsheet - Reference

=head1 OVERVIEW

This document contains a concise all-purpose reference.

=head1 RESERVED STASH VALUES

Besides everything prefixed with C<mojo.> there are a few stash values that
are reserved for routes and the renderer.

=head2 C<action>

  $r->route('/welcome')->to(action => 'hello');

Action to dispatch to.

=head2 C<app>

  $r->route('/welcome')->to(app => MyApp->new);

Embedded application to dispatch to.

=head2 C<cb>

  $r->route('/welcome')->to(cb => sub {...});

Callback to dispatch to.

=head2 C<class>

  $r->route('/welcome')->to(class => 'Greeting');

Camelized alternative to C<controller>.

=head2 C<controller>

  $r->route('/welcome')->to(controller => 'greetings');

Controller to dispatch to.

=head2 C<data>

  $self->render(data => 'raw bytes');

Turn raw bytes into a response.

=head2 C<extends>

  $self->render(extends => 'template');

Template to extend.

=head2 C<format>

  $self->render(format => 'rss');

Format to render.

=head2 C<handler>

  $self->render(handler => 'ep');

Handler to use for rendering.

=head2 C<inline>

  $self->render(inline => '<%= 1 + 1%>');

Inline template to render.

=head2 C<json>

  $self->render(json => {foo => 23});

Turn Perl structure into JSON response.

=head2 C<layout>

  $self->render(layout => 'green');

Layout to render.

=head2 C<method>

  $r->route('/welcome')->to(method => 'hello');

Alternative to C<action>.

=head2 C<namespace>

  $r->route('/welcome')->to(namespace => 'TestApp', method => 'lulz');

Namespace to dispatch to.

=head2 C<partial>

  my $result = $self->render(partial => 1);

Return rendering result instead of turning it into a response.

=head2 C<path>

  $r->route('/welcome')->to(path => '/test', app => MyApp->new);

Base path to use for dispatching to embedded applications.

=head2 C<status>

  $self->render(status => 404);

Status code to use for rendered response.

=head2 C<template>

  $self->render(template => 'bye');

Template to render.

=head2 C<text>

  $self->render(text => 'Hello World!');

Turn characters into a response.

=head1 ENVIRONMENT VARIABLES

Many parts of L<Mojolicious> can be tuned with environment variables.
Debug environment variables are excluded because they are for developer use
only.

=head2 C<MOJO_APP>

Decides which L<Mojolicious> or L<Mojo> application will be used, should
always contain a class name like C<MyApp>, usually defaults to
L<Mojo::HelloWorld>.

  MOJO_APP=MyApp

=head2 C<MOJO_CA_FILE>

The path to the TLS CA authority file, should always contain a path like
C</etc/tls/cacerts.pem>.
Note that L<IO::Socket::SSL> must be installed for TLS support.

  MOJO_CA_FILE=/etc/tls/cacerts.pem

=head2 C<MOJO_CERT_FILE>

The path to the TLS certificate, should always contain a path like
C</etc/tls/client.crt>.
Note that L<IO::Socket::SSL> must be installed for TLS support.

  MOJO_CERT_FILE=/etc/tls/client.crt

=head2 C<MOJO_CHUNK_SIZE>

Chunk size used for I/O operations in bytes, a bigger chunk size speeds up
I/O operations but will also use more memory, defaults to C<131072>.

  MOJO_CHUNK_SIZE=1024

=head2 C<MOJO_CONFIG>

Config file to be used by L<Mojolicious::Plugin::Config> and
L<Mojolicious::Plugin::JSONConfig>, quite useful for testing.

   MOJO_CONFIG=myapp.conf

=head2 C<MOJO_DNS_SERVER>

C<DNS> server to use for non-blocking lookups.

  MOJO_DNS_SERVER=8.8.8.8

=head2 C<MOJO_HOME>

Home directory for the L<Mojolicious> application, should always contain a
path like C</home/sri/myapp>.

  MOJO_HOME=/home/sri/myapp

=head2 C<MOJO_IOWATCHER>

Alternative L<Mojo::IOWatcher> implementation to try.

  MOJO_IOWATCHER=Mojo::IOWatcher::EV

=head2 C<MOJO_KEY_FILE>

The path to the TLS key, should always contain a path like
C</etc/tls/client.key>.
Note that L<IO::Socket::SSL> must be installed for TLS support.

  MOJO_KEY_FILE=/etc/tls/client.key

=head2 C<MOJO_LOG_LEVEL>

Log level for the L<Mojolicious> application, should contain a valid log
level like C<debug> or C<error>.

  MOJO_LOG_LEVEL=debug
  MOJO_LOG_LEVEL=error

=head2 C<MOJO_MAX_LEFTOVER_SIZE>

Maximum size in bytes of buffer for pipelined HTTP requests, defaults to
C<262144>.

  MOJO_MAX_LEFTOVER_SIZE=2048

=head2 C<MOJO_MAX_LINE_SIZE>

Maximum line size for HTTP message start lines and headers in bytes, defaults
to C<10240>.

  MOJO_MAX_LINE_SIZE=2048

=head2 C<MOJO_MAX_MEMORY_SIZE>

Maximum size in bytes for HTTP content to keep in memory, bigger content will
be written to temporary files, defaults to C<262144>.

  MOJO_MAX_MEMORY_SIZE=2048

=head2 C<MOJO_MAX_MESSAGE_SIZE>

Maximum size for HTTP messages in bytes, defaults to C<5242880>.

  MOJO_MAX_MESSAGE_SIZE=1024

=head2 C<MOJO_MAX_REDIRECTS>

  MOJO_MAX_REDIRECTS=3

Maximum number of redirects L<Mojo::UserAgent> will follow, defaults to C<0>.

=head2 C<MOJO_MAX_WEBSOCKET_SIZE>

Maximum size for WebSocket messages in bytes, defaults to C<262144>.

  MOJO_MAX_WEBSOCKET_SIZE=1024

=head2 C<MOJO_MODE>

Run mode for the L<Mojolicious> application, should contain a valid mode like
C<development> or C<production>.

  MOJO_MODE=development
  MOJO_MODE=production

=head2 C<MOJO_NO_BONJOUR>

Disable Bonjour support.
Note that L<Net::Rendezvous::Publish> must be installed for Bonjour support.

  MOJO_NO_BONJOUR=1

=head2 C<MOJO_NO_DETECT>

Disable L<Mojolicious> deployment environment detection.

  MOJO_NO_DETECT=1

=head2 C<MOJO_NO_IPV6>

Disable IPv6 support.
Note that L<IO::Socket::IP> must be installed for IPv6 support.

  MOJO_NO_IPV6=1

=head2 C<MOJO_NO_RESOLVER>

Disable non-blocking resolver support and fall back to blocking system
resolver.

  MOJO_NO_RESOLVER=1

=head2 C<MOJO_NO_TLS>

Disable TLS support, this might result in slightly better performance and
less memory use.
Note that L<IO::Socket::SSL> must be installed for TLS support.

  MOJO_NO_TLS=1

=head2 C<MOJO_PROXY>

Enable automatic HTTP and HTTPS proxy detection in L<Mojo::UserAgent>, for
security reasons this is disabled by default.

  MOJO_PROXY=1

=head2 C<MOJO_REVERSE_PROXY>

Enable reverse proxy support for L<Mojolicious> application.
This allows L<Mojolicious> to automatically pick up the C<X-Forwarded-For>,
C<X-Forwarded-Host> and C<X-Forwarded-HTTPS> headers.

  MOJO_REVERSE_PROXY=1

=head2 C<MOJO_STATIC_CLASS>

Class the L<Mojolicious> static file dispatcher should use to find C<DATA>
templates, defaults to C<main>.

  MOJO_STATIC_CLASS=MyApp

=head2 C<MOJO_TEMPLATE_CLASS>

Class the L<Mojolicious> renderer should use to find C<DATA> templates,
defaults to C<main>.

  MOJO_TEMPLATE_CLASS=MyApp

=head2 C<MOJO_TMPDIR>

Directory for temporary files like huge uploads, defaults to using a random
platform specific temporary directory.

  MOJO_TMPDIR=/tmp/mojo

=head1 MORE

You can continue with L<Mojolicious::Guides> now or take a look at the
Mojolicious wiki L<http://github.com/kraih/mojo/wiki>, which contains a lot
more documentation and examples by many different authors.

=cut