Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
removed experimental status from a few more classes, helpers, attribu…
…tes and methods, also removed experimental examples from stable documentation
  • Loading branch information
kraih committed Mar 16, 2012
1 parent cf2bd89 commit 39c7491
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 52 deletions.
15 changes: 9 additions & 6 deletions Changes
Expand Up @@ -7,18 +7,21 @@ This file documents the revision history for Perl extension Mojolicious.
- Removed experimental status from Mojo::Server::Morbo.
- Removed experimental status from Mojo::Transaction::WebSocket.
- Removed experimental status from Mojo::UserAgent::Transactor.
- Removed experimental status from Mojolicious::Command::cpanify.
- Removed experimental status from upgrade event in
Mojo::Transaction::HTTP.
- Removed experimental status from t helper in
Mojolicious::Plugin::TagHelpers.
- Removed experimental status from url_with helper in
Mojolicious::Plugin::DefaultHelpers.
- Removed experimental status from current_route and url_with helpers
in Mojolicious::Plugin::DefaultHelpers.
- Removed experimental status from websocket function in
Mojolicious::Lite.
- Removed experimental status from cache attribute in
Mojolicious::Renderer.
- Removed experimental status from format attribute in
Mojolicious::Routes::Pattern.
- Removed experimental status from ca and local_address and
transactor attributes in Mojo::UserAgent.
- Removed experimental status from ca and local_address,
request_timeout and transactor attributes in Mojo::UserAgent.
- Removed experimental status from cache attribute in
Mojolicious::Routes.
- Removed experimental status from send method in
Expand All @@ -28,8 +31,8 @@ This file documents the revision history for Perl extension Mojolicious.
websocket_ok methods in Test::Mojo.
- Removed experimental status from detect method in
Mojolicious::Types.
- Removed experimental status from build_websocket_tx and websocket
methods in Mojo::UserAgent.
- Removed experimental status from app_url, build_websocket_tx and
websocket methods in Mojo::UserAgent.
- Removed experimental status from emit_safe method in
Mojo::EventEmitter.
- Removed experimental status from to_psgi_app method in
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojo/Transaction/HTTP.pm
Expand Up @@ -308,8 +308,7 @@ Emitted when a request is ready and needs to be handled.
});
Emitted when transaction gets upgraded to a L<Mojo::Transaction::WebSocket>
object. Note that this event is EXPERIMENTAL and might change without
warning!
object.
$tx->on(upgrade => sub {
my ($tx, $ws) = @_;
Expand Down
4 changes: 1 addition & 3 deletions lib/Mojo/UserAgent.pm
Expand Up @@ -796,8 +796,7 @@ 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 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. Note that
this attribute is EXPERIMENTAL and might change without warning!
indefinitely. The timeout will reset for every followed redirect.
# Total limit of 5 seconds, of which 3 seconds may be spent connecting
$ua->max_redirects(0)->connect_timeout(3)->request_timeout(5);
Expand Down Expand Up @@ -835,7 +834,6 @@ L<Mojolicious> object.
my $url = $ua->app_url('https');
Get absolute L<Mojo::URL> object for C<app> and switch protocol if necessary.
Note that this method is EXPERIMENTAL and might change without warning!
say $ua->app_url->port;
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojolicious/Command/cpanify.pm
Expand Up @@ -71,8 +71,7 @@ Mojolicious::Command::cpanify - Cpanify command
=head1 DESCRIPTION
L<Mojolicious::Command::cpanify> is a CPAN uploader. Note that this module is
EXPERIMENTAL and might change without warning!
L<Mojolicious::Command::cpanify> is a CPAN uploader.
=head1 ATTRIBUTES
Expand Down
12 changes: 0 additions & 12 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -928,12 +928,6 @@ will be invoked once all data has been written.
# Send "Ping" frame
$c->send([1, 0, 0, 0, 9, 'Hello World!']);
For mostly idle WebSockets you might also want to increase the inactivity
timeout, which usually defaults to C<15> seconds.
# Increase inactivity timeout for connection to 300 seconds
Mojo::IOLoop->stream($c->tx->connection)->timeout(300);
=head2 C<session>
my $session = $c->session;
Expand Down Expand Up @@ -1056,12 +1050,6 @@ invoked once all data has been written.
});
});
For Comet (C<long polling>) you might also want to increase the inactivity
timeout, which usually defaults to C<15> seconds.
# Increase inactivity timeout for connection to 300 seconds
Mojo::IOLoop->stream($c->tx->connection)->timeout(300);
=head2 C<write_chunk>
$c->write_chunk;
Expand Down
16 changes: 0 additions & 16 deletions lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -391,16 +391,6 @@ created at startup time.

app->start;

Since timers and other low level event watchers are also independent from
applications, errors can't get logged automatically, you can change that by
subscribing to the event L<Mojo::IOWatcher/"error">.

# Forward error messages to the application log
Mojo::IOLoop->singleton->iowatcher->on(error => sub {
my ($watcher, $err) = @_;
app->log->error($err);
});

Just remember that all events are processed cooperatively, so your callbacks
shouldn't block for too long.

Expand All @@ -424,9 +414,6 @@ method L<Mojolicious::Controller/"on">.
# Connected
$self->app->log->debug('WebSocket connected.');

# Increase inactivity timeout for connection a bit
Mojo::IOLoop->stream($self->tx->connection)->timeout(300);

# Incoming message
$self->on(message => sub {
my ($self, $message) = @_;
Expand Down Expand Up @@ -505,9 +492,6 @@ HTTP protocol for transport.
get '/events' => sub {
my $self = shift;

# Increase inactivity timeout for connection a bit
Mojo::IOLoop->stream($self->tx->connection)->timeout(300);

# Change content type
$self->res->headers->content_type('text/event-stream');

Expand Down
3 changes: 1 addition & 2 deletions lib/Mojolicious/Plugin/DefaultHelpers.pm
Expand Up @@ -192,8 +192,7 @@ Append content to named buffer and retrieve it.
% }
%= current_route
Check or get name of current route. Note that this helper is EXPERIMENTAL and
might change without warning!
Check or get name of current route.
=head2 C<dumper>
Expand Down
9 changes: 0 additions & 9 deletions lib/Test/Mojo.pm
Expand Up @@ -456,15 +456,6 @@ Alias for L<Mojo::UserAgent/"app">.
# Change log level
$t->app->log->level('fatal');
# Disable inactivity timeout for all connections
$t->app->hook(after_build_tx => sub {
my ($tx, $app) = @_;
$tx->on(connection => sub {
my ($tx, $id) = @_;
Mojo::IOLoop->stream($id)->timeout(0);
});
});
=head2 C<content_is>
$t = $t->content_is('working!');
Expand Down

0 comments on commit 39c7491

Please sign in to comment.