Skip to content

Commit

Permalink
highlight environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 15, 2014
1 parent 13b3f29 commit a22d469
Show file tree
Hide file tree
Showing 27 changed files with 66 additions and 64 deletions.
2 changes: 1 addition & 1 deletion lib/Mojo/Asset/File.pm
Expand Up @@ -202,7 +202,7 @@ necessary.
$file = $file->tmpdir('/tmp');
Temporary directory used to generate L</"path">, defaults to the value of the
MOJO_TMPDIR environment variable or auto detection.
C<MOJO_TMPDIR> environment variable or auto detection.
=head1 METHODS
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Asset/Memory.pm
Expand Up @@ -112,7 +112,7 @@ automatically upgrade to a L<Mojo::Asset::File> object.
Maximum size in bytes of data to keep in memory before automatically upgrading
to a L<Mojo::Asset::File> object, defaults to the value of the
MOJO_MAX_MEMORY_SIZE environment variable or C<262144>.
C<MOJO_MAX_MEMORY_SIZE> environment variable or C<262144>.
=head1 METHODS
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Base.pm
Expand Up @@ -216,7 +216,7 @@ and is also available as C<$_>.
=head1 DEBUGGING
You can set the MOJO_BASE_DEBUG environment variable to get some advanced
You can set the C<MOJO_BASE_DEBUG> environment variable to get some advanced
diagnostics information printed to C<STDERR>.
MOJO_BASE_DEBUG=1
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Content.pm
Expand Up @@ -399,15 +399,15 @@ Content headers, defaults to a L<Mojo::Headers> object.
$content = $content->max_buffer_size(1024);
Maximum size in bytes of buffer for content parser, defaults to the value of
the MOJO_MAX_BUFFER_SIZE environment variable or C<262144>.
the C<MOJO_MAX_BUFFER_SIZE> environment variable or C<262144>.
=head2 max_leftover_size
my $size = $content->max_leftover_size;
$content = $content->max_leftover_size(1024);
Maximum size in bytes of buffer for pipelined HTTP requests, defaults to the
value of the MOJO_MAX_LEFTOVER_SIZE environment variable or C<262144>.
value of the C<MOJO_MAX_LEFTOVER_SIZE> environment variable or C<262144>.
=head2 relaxed
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/EventEmitter.pm
Expand Up @@ -195,7 +195,7 @@ Unsubscribe from event.
=head1 DEBUGGING
You can set the MOJO_EVENTEMITTER_DEBUG environment variable to get some
You can set the C<MOJO_EVENTEMITTER_DEBUG> environment variable to get some
advanced diagnostics information printed to C<STDERR>.
MOJO_EVENTEMITTER_DEBUG=1
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Headers.pm
Expand Up @@ -183,7 +183,7 @@ L<Mojo::Headers> implements the following attributes.
$headers = $headers->max_line_size(1024);
Maximum header line size in bytes, defaults to the value of the
MOJO_MAX_LINE_SIZE environment variable or C<10240>.
C<MOJO_MAX_LINE_SIZE> environment variable or C<10240>.
=head1 METHODS
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Home.pm
Expand Up @@ -113,8 +113,8 @@ following new ones.
$home = $home->detect;
$home = $home->detect('My::App');
Detect home directory from the value of the MOJO_HOME environment variable or
application class.
Detect home directory from the value of the C<MOJO_HOME> environment variable
or application class.
=head2 lib_dir
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojo/IOLoop.pm
Expand Up @@ -312,8 +312,8 @@ is loaded.
For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically if they are installed.
Individual features can also be disabled with the MOJO_NO_IPV6 and MOJO_NO_TLS
environment variables.
Individual features can also be disabled with the C<MOJO_NO_IPV6> and
C<MOJO_NO_TLS> environment variables.
See L<Mojolicious::Guides::Cookbook/"REAL-TIME WEB"> for more.
Expand Down Expand Up @@ -620,7 +620,7 @@ seconds.
=head1 DEBUGGING
You can set the MOJO_IOLOOP_DEBUG environment variable to get some advanced
You can set the C<MOJO_IOLOOP_DEBUG> environment variable to get some advanced
diagnostics information printed to C<STDERR>.
MOJO_IOLOOP_DEBUG=1
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Log.pm
Expand Up @@ -149,7 +149,7 @@ The last few logged messages.
Active log level, defaults to C<debug>. Available log levels are C<debug>,
C<info>, C<warn>, C<error> and C<fatal>, in that order. Note that the
MOJO_LOG_LEVEL environment variable can override this value.
C<MOJO_LOG_LEVEL> environment variable can override this value.
=head2 max_history_size
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojo/Message.pm
Expand Up @@ -385,17 +385,17 @@ Default charset used for form-data parsing, defaults to C<UTF-8>.
$msg = $msg->max_line_size(1024);
Maximum start line size in bytes, defaults to the value of the
MOJO_MAX_LINE_SIZE environment variable or C<10240>.
C<MOJO_MAX_LINE_SIZE> environment variable or C<10240>.
=head2 max_message_size
my $size = $msg->max_message_size;
$msg = $msg->max_message_size(1024);
Maximum message size in bytes, defaults to the value of the
MOJO_MAX_MESSAGE_SIZE environment variable or C<10485760>. Setting the value
to C<0> will allow messages of indefinite size. Note that increasing this
value can also drastically increase memory usage, should you for example
C<MOJO_MAX_MESSAGE_SIZE> environment variable or C<10485760>. Setting the
value to C<0> will allow messages of indefinite size. Note that increasing
this value can also drastically increase memory usage, should you for example
attempt to parse an excessively large message body with the L</"body_params">,
L</"dom"> or L</"json"> methods.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Reactor.pm
Expand Up @@ -105,7 +105,7 @@ Restart active timer. Meant to be overloaded in a subclass.
my $class = Mojo::Reactor->detect;
Detect and load the best reactor implementation available, will try the value
of the MOJO_REACTOR environment variable, L<Mojo::Reactor::EV> or
of the C<MOJO_REACTOR> environment variable, L<Mojo::Reactor::EV> or
L<Mojo::Reactor::Poll>.
# Instantiate best reactor implementation available
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojo/Server/Daemon.pm
Expand Up @@ -297,7 +297,7 @@ For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
MOJO_NO_IPV6 and MOJO_NO_TLS environment variables.
C<MOJO_NO_IPV6> and C<MOJO_NO_TLS> environment variables.
See L<Mojolicious::Guides::Cookbook/"DEPLOYMENT"> for more.
Expand Down Expand Up @@ -337,7 +337,7 @@ Group for server process.
$daemon = $daemon->inactivity_timeout(5);
Maximum amount of time in seconds a connection can be inactive before getting
closed, defaults to the value of the MOJO_INACTIVITY_TIMEOUT environment
closed, defaults to the value of the C<MOJO_INACTIVITY_TIMEOUT> environment
variable or C<15>. Setting the value to C<0> will allow connections to be
inactive indefinitely.
Expand All @@ -355,7 +355,7 @@ L<Mojo::IOLoop> singleton.
$daemon = $daemon->listen(['https://localhost:3000']);
List of one or more locations to listen on, defaults to the value of the
MOJO_LISTEN environment variable or C<http://*:3000>.
C<MOJO_LISTEN> environment variable or C<http://*:3000>.
# Listen on all IPv4 interfaces
$daemon->listen(['http://*:3000']);
Expand Down Expand Up @@ -485,7 +485,7 @@ Stop accepting connections.
=head1 DEBUGGING
You can set the MOJO_DAEMON_DEBUG environment variable to get some advanced
You can set the C<MOJO_DAEMON_DEBUG> environment variable to get some advanced
diagnostics information printed to C<STDERR>.
MOJO_DAEMON_DEBUG=1
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Server/Hypnotoad.pm
Expand Up @@ -188,7 +188,7 @@ For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
MOJO_NO_IPV6 and MOJO_NO_TLS environment variables.
C<MOJO_NO_IPV6> and C<MOJO_NO_TLS> environment variables.
See L<Mojolicious::Guides::Cookbook/"DEPLOYMENT"> for more.
Expand Down Expand Up @@ -366,7 +366,7 @@ the server has been stopped.
Activate reverse proxy support, which allows for the C<X-Forwarded-For> and
C<X-Forwarded-HTTPS> headers to be picked up automatically, defaults to the
value of the MOJO_REVERSE_PROXY environment variable.
value of the C<MOJO_REVERSE_PROXY> environment variable.
=head2 upgrade_timeout
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Morbo.pm
Expand Up @@ -131,7 +131,7 @@ For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
MOJO_NO_IPV6 and MOJO_NO_TLS environment variables.
C<MOJO_NO_IPV6> and C<MOJO_NO_TLS> environment variables.
See L<Mojolicious::Guides::Cookbook/"DEPLOYMENT"> for more.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Prefork.pm
Expand Up @@ -264,7 +264,7 @@ For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
MOJO_NO_IPV6 and MOJO_NO_TLS environment variables.
C<MOJO_NO_IPV6> and C<MOJO_NO_TLS> environment variables.
See L<Mojolicious::Guides::Cookbook/"DEPLOYMENT"> for more.
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Template.pm
Expand Up @@ -664,8 +664,8 @@ Render template file.
=head1 DEBUGGING
You can set the MOJO_TEMPLATE_DEBUG environment variable to get some advanced
diagnostics information printed to C<STDERR>.
You can set the C<MOJO_TEMPLATE_DEBUG> environment variable to get some
advanced diagnostics information printed to C<STDERR>.
MOJO_TEMPLATE_DEBUG=1
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojo/Transaction/WebSocket.pm
Expand Up @@ -504,7 +504,7 @@ Mask outgoing frames with XOR cipher and a random 32bit key.
$ws = $ws->max_websocket_size(1024);
Maximum WebSocket message size in bytes, defaults to the value of the
MOJO_MAX_WEBSOCKET_SIZE environment variable or C<262144>.
C<MOJO_MAX_WEBSOCKET_SIZE> environment variable or C<262144>.
=head1 METHODS
Expand Down Expand Up @@ -701,8 +701,8 @@ Write data server-side, used to implement web servers.
=head1 DEBUGGING
You can set the MOJO_WEBSOCKET_DEBUG environment variable to get some advanced
diagnostics information printed to C<STDERR>.
You can set the C<MOJO_WEBSOCKET_DEBUG> environment variable to get some
advanced diagnostics information printed to C<STDERR>.
MOJO_WEBSOCKET_DEBUG=1
Expand Down
23 changes: 12 additions & 11 deletions lib/Mojo/UserAgent.pm
Expand Up @@ -475,7 +475,7 @@ For better scalability (epoll, kqueue) and to provide IPv6 as well as TLS
support, the optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.20+) and
L<IO::Socket::SSL> (1.75+) will be used automatically by L<Mojo::IOLoop> if
they are installed. Individual features can also be disabled with the
MOJO_NO_IPV6 and MOJO_NO_TLS environment variables.
C<MOJO_NO_IPV6> and C<MOJO_NO_TLS> environment variables.
See L<Mojolicious::Guides::Cookbook/"USER AGENT"> for more.
Expand Down Expand Up @@ -524,7 +524,7 @@ L<Mojo::UserAgent> implements the following attributes.
$ua = $ua->ca('/etc/tls/ca.crt');
Path to TLS certificate authority file, defaults to the value of the
MOJO_CA_FILE environment variable. Also activates hostname verification.
C<MOJO_CA_FILE> environment variable. Also activates hostname verification.
# Show certificate authorities for debugging
IO::Socket::SSL::set_defaults(
Expand All @@ -535,7 +535,7 @@ MOJO_CA_FILE environment variable. Also activates hostname verification.
my $cert = $ua->cert;
$ua = $ua->cert('/etc/tls/client.crt');
Path to TLS certificate file, defaults to the value of the MOJO_CERT_FILE
Path to TLS certificate file, defaults to the value of the C<MOJO_CERT_FILE>
environment variable.
=head2 connect_timeout
Expand All @@ -544,7 +544,7 @@ environment variable.
$ua = $ua->connect_timeout(5);
Maximum amount of time in seconds establishing a connection may take before
getting canceled, defaults to the value of the MOJO_CONNECT_TIMEOUT
getting canceled, defaults to the value of the C<MOJO_CONNECT_TIMEOUT>
environment variable or C<10>.
=head2 cookie_jar
Expand All @@ -564,7 +564,7 @@ L<Mojo::UserAgent::CookieJar> object.
$ua = $ua->inactivity_timeout(15);
Maximum amount of time in seconds a connection can be inactive before getting
closed, defaults to the value of the MOJO_INACTIVITY_TIMEOUT environment
closed, defaults to the value of the C<MOJO_INACTIVITY_TIMEOUT> environment
variable or C<20>. Setting the value to C<0> will allow connections to be
inactive indefinitely.
Expand All @@ -581,8 +581,8 @@ L<Mojo::IOLoop> object.
my $key = $ua->key;
$ua = $ua->key('/etc/tls/client.crt');
Path to TLS key file, defaults to the value of the MOJO_KEY_FILE environment
variable.
Path to TLS key file, defaults to the value of the C<MOJO_KEY_FILE>
environment variable.
=head2 local_address
Expand All @@ -605,7 +605,8 @@ before it starts closing the oldest ones, defaults to C<5>.
$ua = $ua->max_redirects(3);
Maximum number of redirects the user agent will follow before it fails,
defaults to the value of the MOJO_MAX_REDIRECTS environment variable or C<0>.
defaults to the value of the C<MOJO_MAX_REDIRECTS> environment variable or
C<0>.
=head2 proxy
Expand All @@ -624,7 +625,7 @@ Proxy manager, defaults to a L<Mojo::UserAgent::Proxy> object.
Maximum amount of time in seconds establishing a connection, sending the
request and receiving a whole response may take before getting canceled,
defaults to the value of the MOJO_REQUEST_TIMEOUT environment variable or
defaults to the value of the C<MOJO_REQUEST_TIMEOUT> environment variable or
C<0>. Setting the value to C<0> will allow the user agent to wait
indefinitely. The timeout will reset for every followed redirect.
Expand Down Expand Up @@ -888,8 +889,8 @@ C<Sec-WebSocket-Extensions> header.
=head1 DEBUGGING
You can set the MOJO_USERAGENT_DEBUG environment variable to get some advanced
diagnostics information printed to C<STDERR>.
You can set the C<MOJO_USERAGENT_DEBUG> environment variable to get some
advanced diagnostics information printed to C<STDERR>.
MOJO_USERAGENT_DEBUG=1
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojo/UserAgent/Proxy.pm
Expand Up @@ -86,9 +86,9 @@ implements the following new ones.
$proxy = $proxy->detect;
Check environment variables HTTP_PROXY, http_proxy, HTTPS_PROXY, https_proxy,
NO_PROXY and no_proxy for proxy information. Automatic proxy detection can be
enabled with the MOJO_PROXY environment variable.
Check environment variables C<HTTP_PROXY>, C<http_proxy>, C<HTTPS_PROXY>,
C<https_proxy>, C<NO_PROXY> and C<no_proxy> for proxy information. Automatic
proxy detection can be enabled with the C<MOJO_PROXY> environment variable.
=head2 inject
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Util.pm
Expand Up @@ -506,7 +506,7 @@ Decode bytes to characters and return C<undef> if decoding failed.
deprecated 'foo is DEPRECATED in favor of bar';
Warn about deprecated feature from perspective of caller. You can also set the
MOJO_FATAL_DEPRECATIONS environment variable to make them die instead.
C<MOJO_FATAL_DEPRECATIONS> environment variable to make them die instead.
=head2 dumper
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojolicious.pm
Expand Up @@ -413,10 +413,10 @@ L<Mojolicious::Controller>.
$app = $app->mode('production');
The operating mode for your application, defaults to a value from the
MOJO_MODE and PLACK_ENV environment variables or C<development>. Right before
calling L</"startup">, L<Mojolicious> will pick up the current mode, name the
log file after it and raise the log level from C<debug> to C<info> if it has a
value other than C<development>.
C<MOJO_MODE> and C<PLACK_ENV> environment variables or C<development>. Right
before calling L</"startup">, L<Mojolicious> will pick up the current mode,
name the log file after it and raise the log level from C<debug> to C<info> if
it has a value other than C<development>.
=head2 moniker
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Commands.pm
Expand Up @@ -306,7 +306,7 @@ Try to detect environment.
$commands->run(@ARGV);
Load and run commands. Automatic deployment environment detection can be
disabled with the MOJO_NO_DETECT environment variable.
disabled with the C<MOJO_NO_DETECT> environment variable.
=head2 start_app
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -230,7 +230,7 @@ such as C<FCGI>, C<uWSGI> and C<mod_perl>.
$ plackup ./script/myapp -s FCGI -l /tmp/myapp.sock

If an older server adapter is not be able to correctly detect the application
home directory, you can simply use the MOJO_HOME environment variable.
home directory, you can simply use the C<MOJO_HOME> environment variable.

$ MOJO_HOME=/home/sri/myapp plackup ./script/myapp
HTTP::Server::PSGI: Accepting connections at http://0:5000/
Expand Down Expand Up @@ -923,7 +923,7 @@ file with L<Mojo::Asset::File/"move_to">.
$tx->res->content->asset->move_to('mojo.tar.gz');

To protect you from excessively large files there is also a limit of 10MB by
default, which you can tweak with the MOJO_MAX_MESSAGE_SIZE environment
default, which you can tweak with the C<MOJO_MAX_MESSAGE_SIZE> environment
variable.

# Increase limit to 1GB
Expand Down

0 comments on commit a22d469

Please sign in to comment.