Skip to content

Commit

Permalink
fixed deprecation tests and tweaked documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 23, 2013
1 parent 890c57e commit ce3b5d1
Show file tree
Hide file tree
Showing 34 changed files with 119 additions and 130 deletions.
5 changes: 3 additions & 2 deletions Changes
@@ -1,8 +1,9 @@

3.87 2013-02-23
- Added deprecated function to Mojo::Util. (marcus)
- Remove deprecated render_content helper.
- Improved documentation.
- Improved tests.
- Remove deprecated render_content helper
- Add Mojo::Util::deprecated

3.86 2013-02-22
- Welcome to the Mojolicious core team Joel Berger.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Asset/File.pm
Expand Up @@ -200,7 +200,7 @@ necessary.
$file = $file->tmpdir('/tmp');
Temporary directory used to generate C<path>, defaults to the value of the
C<MOJO_TMPDIR> environment variable or auto detection.
MOJO_TMPDIR environment variable or auto detection.
=head1 METHODS
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Asset/Memory.pm
Expand Up @@ -110,7 +110,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
C<MOJO_MAX_MEMORY_SIZE> environment variable or C<262144>.
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 @@ -222,7 +222,7 @@ within the chain.
=head1 DEBUGGING
You can set the C<MOJO_BASE_DEBUG> environment variable to get some advanced
You can set the 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 @@ -398,15 +398,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 C<MOJO_MAX_BUFFER_SIZE> environment variable or C<262144>.
the 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 C<MOJO_MAX_LEFTOVER_SIZE> environment variable or C<262144>.
value of the 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 @@ -198,7 +198,7 @@ Unsubscribe from event.
=head1 DEBUGGING
You can set the C<MOJO_EVENTEMITTER_DEBUG> environment variable to get some
You can set the 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/Exception.pm
Expand Up @@ -177,7 +177,7 @@ Exception message.
$e = $e->verbose(1);
Activate verbose rendering, defaults to the value of the
C<MOJO_EXCEPTION_VERBOSE> environment variable or C<0>.
MOJO_EXCEPTION_VERBOSE environment variable or C<0>.
=head1 METHODS
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Headers.pm
Expand Up @@ -201,7 +201,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
C<MOJO_MAX_LINE_SIZE> environment variable or C<10240>.
MOJO_MAX_LINE_SIZE environment variable or C<10240>.
=head1 METHODS
Expand Down
10 changes: 5 additions & 5 deletions lib/Mojo/Home.pm
Expand Up @@ -10,7 +10,7 @@ use File::Basename 'dirname';
use File::Find 'find';
use File::Spec::Functions qw(abs2rel catdir catfile splitdir);
use FindBin;
use Mojo::Util qw(class_to_path slurp deprecated);
use Mojo::Util qw(class_to_path deprecated slurp);

sub new { shift->SUPER::new->parse(@_) }

Expand Down Expand Up @@ -82,8 +82,8 @@ sub rel_file { catfile(@{shift->{parts} || []}, split '/', shift) }

# DEPRECATED in Rainbow!
sub slurp_rel_file {
deprecated "Mojo::Home->slurp_rel_file is DEPRECATED "
. "in favor of Mojo::Util->slurp!!!";
deprecated 'Mojo::Home->slurp_rel_file is DEPRECATED in favor of '
. 'Mojo::Util->slurp';
slurp shift->rel_file(@_);
}

Expand Down Expand Up @@ -127,8 +127,8 @@ Construct a new L<Mojo::Home> object.
$home = $home->detect;
$home = $home->detect('My::App');
Detect home directory from the value of the C<MOJO_HOME> environment variable
or application class.
Detect home directory from the value of the MOJO_HOME environment variable or
application class.
=head2 lib_dir
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojo/IOLoop.pm
Expand Up @@ -333,8 +333,8 @@ solid and scalable non-blocking TCP clients and servers.
Optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.16+) and
L<IO::Socket::SSL> (1.75+) are supported transparently, and used if installed.
Individual features can also be disabled with the C<MOJO_NO_IPV6> and
C<MOJO_NO_TLS> environment variables.
Individual features can also be disabled with the MOJO_NO_IPV6 and MOJO_NO_TLS
environment variables.
A TLS certificate and key are also built right in, to make writing test
servers as easy as possible. Also note that for convenience the C<PIPE> signal
Expand Down Expand Up @@ -613,7 +613,7 @@ seconds.
=head1 DEBUGGING
You can set the C<MOJO_IOLOOP_DEBUG> environment variable to get some advanced
You can set the 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 @@ -131,7 +131,7 @@ or C<STDERR>.
my $level = $log->level;
$log = $log->level('debug');
Active log level, defaults to the value of the C<MOJO_LOG_LEVEL> environment
Active log level, defaults to the value of the MOJO_LOG_LEVEL environment
variable or C<debug>.
These levels are currently available:
Expand Down
10 changes: 5 additions & 5 deletions lib/Mojo/Message.pm
Expand Up @@ -436,18 +436,18 @@ 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
C<MOJO_MAX_LINE_SIZE> environment variable or C<10240>.
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
C<MOJO_MAX_MESSAGE_SIZE> environment variable or C<5242880>. 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
C<body_params>, C<dom> or C<json> methods.
MOJO_MAX_MESSAGE_SIZE environment variable or C<5242880>. 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 C<body_params>,
C<dom> or C<json> methods.
=head2 version
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Reactor.pm
Expand Up @@ -89,7 +89,7 @@ implements the following new ones.
my $class = Mojo::Reactor->detect;
Detect and load the best reactor implementation available, will try the value
of the C<MOJO_REACTOR> environment variable, L<Mojo::Reactor::EV> or
of the 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 @@ -298,7 +298,7 @@ multiple event loop support.
Optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.16+) and
L<IO::Socket::SSL> (1.75+) are supported transparently through
L<Mojo::IOLoop>, and used if installed. Individual features can also be
disabled with the C<MOJO_NO_IPV6> and C<MOJO_NO_TLS> environment variables.
disabled with the MOJO_NO_IPV6 and MOJO_NO_TLS environment variables.
See L<Mojolicious::Guides::Cookbook> for more.
Expand Down Expand Up @@ -331,7 +331,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 C<MOJO_INACTIVITY_TIMEOUT> environment
closed, defaults to the value of the MOJO_INACTIVITY_TIMEOUT environment
variable or C<15>. Setting the value to C<0> will allow connections to be
inactive indefinitely.
Expand All @@ -349,7 +349,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
C<MOJO_LISTEN> environment variable or C<http://*:3000>.
MOJO_LISTEN environment variable or C<http://*:3000>.
# Listen on IPv6 interface
$daemon->listen(['http://[::1]:4000']);
Expand Down Expand Up @@ -445,7 +445,7 @@ Stop accepting connections.
=head1 DEBUGGING
You can set the C<MOJO_DAEMON_DEBUG> environment variable to get some advanced
You can set the 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 @@ -181,7 +181,7 @@ C<production> mode.
Optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.16+) and
L<IO::Socket::SSL> (1.75+) are supported transparently through
L<Mojo::IOLoop>, and used if installed. Individual features can also be
disabled with the C<MOJO_NO_IPV6> and C<MOJO_NO_TLS> environment variables.
disabled with the MOJO_NO_IPV6 and MOJO_NO_TLS environment variables.
See L<Mojolicious::Guides::Cookbook> for more.
Expand Down Expand Up @@ -364,7 +364,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 C<MOJO_REVERSE_PROXY> environment variable.
value of the MOJO_REVERSE_PROXY environment variable.
=head2 upgrade_timeout
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Morbo.pm
Expand Up @@ -127,7 +127,7 @@ To start applications with it you can use the L<morbo> script.
Optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.16+) and
L<IO::Socket::SSL> (1.75+) are supported transparently through
L<Mojo::IOLoop>, and used if installed. Individual features can also be
disabled with the C<MOJO_NO_IPV6> and C<MOJO_NO_TLS> environment variables.
disabled with the MOJO_NO_IPV6 and MOJO_NO_TLS environment variables.
See L<Mojolicious::Guides::Cookbook> for more.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Prefork.pm
Expand Up @@ -260,7 +260,7 @@ applications.
Optional modules L<EV> (4.0+), L<IO::Socket::IP> (0.16+) and
L<IO::Socket::SSL> (1.75+) are supported transparently through
L<Mojo::IOLoop>, and used if installed. Individual features can also be
disabled with the C<MOJO_NO_IPV6> and C<MOJO_NO_TLS> environment variables.
disabled with the MOJO_NO_IPV6 and MOJO_NO_TLS environment variables.
See L<Mojolicious::Guides::Cookbook> for more.
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Template.pm
Expand Up @@ -687,8 +687,8 @@ Render template file.
=head1 DEBUGGING
You can set the C<MOJO_TEMPLATE_DEBUG> environment variable to get some
advanced diagnostics information printed to C<STDERR>.
You can set the 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 @@ -417,7 +417,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
C<MOJO_MAX_WEBSOCKET_SIZE> environment variable or C<262144>.
MOJO_MAX_WEBSOCKET_SIZE environment variable or C<262144>.
=head1 METHODS
Expand Down Expand Up @@ -596,8 +596,8 @@ Write data server-side, used to implement web servers.
=head1 DEBUGGING
You can set the C<MOJO_WEBSOCKET_DEBUG> environment variable to get some
advanced diagnostics information printed to C<STDERR>.
You can set the MOJO_WEBSOCKET_DEBUG environment variable to get some advanced
diagnostics information printed to C<STDERR>.
MOJO_WEBSOCKET_DEBUG=1
Expand Down

0 comments on commit ce3b5d1

Please sign in to comment.