Skip to content

Commit

Permalink
removed experimental status from many events, attributes and methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 1, 2012
1 parent c578195 commit da55fb3
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 93 deletions.
20 changes: 20 additions & 0 deletions Changes
Expand Up @@ -4,6 +4,26 @@ This file documents the revision history for Perl extension Mojolicious.
- Deprecated Test::Mojo->max_redirects.
- Removed exprimental status from respond_to method in
Mojolicious::Controller.
- Removed experimental status from error event in Mojo::UserAgent.
- Removed experimental status from connect_timeout attribute in
Mojo::UserAgent.
- Removed experimental status from connection event in
Mojo::Transaction.
- Removed experimental status from upgrade event in
Mojo::Asset::Memory.
- Removed experimental status from auto_upgrade and max_memory_size
attributes in Mojo::Asset::Memory.
- Removed experimental status from part event in
Mojo::Content::MultiPart.
- Removed experimental status from upgrade event in
Mojo::Content::Single.
- Removed experimental status from auto_upgrade attribute in
Mojo::Content::Single.
- Removed experimental status from body event in Mojo::Content.
- Removed experimental status from mojo_lib_dir and slurp_rel_file
methods in Mojo::Home.
- Removed experimental status from message event in Mojo::Log.
- Removed experimental status from contains method in Mojo::Path.
- Removed test_server method from Test::Mojo.
- Renamed test_server method in Mojo::UserAgent to app_url.
- Improved RFC 6265 compliance of generated request headers.
Expand Down
9 changes: 3 additions & 6 deletions lib/Mojo/Asset/Memory.pm
Expand Up @@ -91,8 +91,7 @@ L<Mojo::Asset::Memory> can emit the following events.
my ($mem, $file) = @_;
});
Emitted when asset gets upgraded to a L<Mojo::Asset::File> object. Note that
this event is EXPERIMENTAL and might change without warning!
Emitted when asset gets upgraded to a L<Mojo::Asset::File> object.
$mem->on(upgrade => sub {
my ($mem, $file) = @_;
Expand All @@ -110,8 +109,7 @@ implements the following new ones.
$mem = $mem->auto_upgrade(1);
Try to detect if content size exceeds C<max_memory_size> limit and
automatically upgrade to a L<Mojo::Asset::File> object. Note that this
attribute is EXPERIMENTAL and might change without warning!
automatically upgrade to a L<Mojo::Asset::File> object.
=head2 C<max_memory_size>
Expand All @@ -120,8 +118,7 @@ attribute is EXPERIMENTAL and might change without warning!
Maximum asset size in bytes, only attempt upgrading to a L<Mojo::Asset::File>
object after reaching this limit, defaults to the value of
C<MOJO_MAX_MEMORY_SIZE> or C<262144>. Note that this attribute is
EXPERIMENTAL and might change without warning!
C<MOJO_MAX_MEMORY_SIZE> or C<262144>.
=head1 METHODS
Expand Down
10 changes: 1 addition & 9 deletions lib/Mojo/Content.pm
Expand Up @@ -144,13 +144,6 @@ sub is_parsing_body { (shift->{state} || '') eq 'body' }

sub leftovers { shift->{buffer} }

# DEPRECATED in Smiling Face With Sunglasses!
sub on_read {
warn
"Mojo::Content->on_read is DEPRECATED in favor of Mojo::Content->on!\n";
shift->on(read => shift);
}

sub parse {
my $self = shift;

Expand Down Expand Up @@ -432,8 +425,7 @@ L<Mojo::Content> can emit the following events.
...
});
Emitted once all headers have been parsed and the body starts. Note that this
event is EXPERIMENTAL and might change without warning!
Emitted once all headers have been parsed and the body starts.
$content->on(body => sub {
my $content = shift;
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojo/Content/MultiPart.pm
Expand Up @@ -256,8 +256,7 @@ emit the following new ones.
...
});
Emitted when a new L<Mojo::Content::Single> part starts. Note that this event
is EXPERIMENTAL and might change without warning!
Emitted when a new L<Mojo::Content::Single> part starts.
$multi->on(part => sub {
my ($multi, $single) = @_;
Expand Down
4 changes: 1 addition & 3 deletions lib/Mojo/Content/Single.pm
Expand Up @@ -95,7 +95,6 @@ emit the following new ones.
});
Emitted when content gets upgraded to a L<Mojo::Content::MultiPart> object.
Note that this event is EXPERIMENTAL and might change without warning!
$single->on(upgrade => sub {
my ($single, $multi) = @_;
Expand All @@ -122,8 +121,7 @@ C<auto_upgrade> enabled.
$single = $single->auto_upgrade(0);
Try to detect multipart content and automatically upgrade to a
L<Mojo::Content::MultiPart> object, defaults to C<1>. Note that this
attribute is EXPERIMENTAL and might change without warning!
L<Mojo::Content::MultiPart> object, defaults to C<1>.
=head1 METHODS
Expand Down
6 changes: 2 additions & 4 deletions lib/Mojo/Home.pm
Expand Up @@ -201,8 +201,7 @@ List all files in directory and subdirectories recursively.
my $path = $home->mojo_lib_dir;
Path to C<lib> directory in which L<Mojolicious> is installed. Note that this
method is EXPERIMENTAL and might change without warning!
Path to C<lib> directory in which L<Mojolicious> is installed.
=head2 C<parse>
Expand All @@ -226,8 +225,7 @@ Generate absolute path for relative file.
my $string = $home->slurp_rel_file('foo/bar.html');
Read all file data at once. Note that this method is EXPERIMENTAL and might
change without warning!
Read all file data at once.
=head2 C<to_string>
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojo/Log.pm
Expand Up @@ -124,8 +124,7 @@ L<Mojo::Log> can emit the following events.
...
});
Emitted when a new message gets logged. Note that this event is EXPERIMENTAL
and might change without warning!
Emitted when a new message gets logged.
$log->unsubscribe('message');
$log->on(message => sub {
Expand Down
15 changes: 0 additions & 15 deletions lib/Mojo/Message.pm
Expand Up @@ -298,21 +298,6 @@ sub leftovers { shift->content->leftovers }

sub max_line_size { shift->headers->max_line_size(@_) }

# DEPRECATED in Smiling Face With Sunglasses!
sub on_finish {
warn
"Mojo::Message->on_finish is DEPRECATED in favor of Mojo::Message->on!\n";
shift->on(finish => shift);
}

# DEPRECATED in Smiling Face With Sunglasses!
sub on_progress {
warn <<EOF;
Mojo::Message->on_progress is DEPRECATED in favor of Mojo::Message->on!
EOF
shift->on(progress => shift);
}

sub param {
my $self = shift;
$self->{body_params} ||= $self->body_params;
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojo/Path.pm
Expand Up @@ -180,8 +180,7 @@ Clone path.
my $success = $path->contains('/foo');
Check if path contains given prefix. Note that this method is EXPERIMENTAL
and might change without warning!
Check if path contains given prefix.
# True
Mojo::Path->new('/foo/bar')->contains('/');
Expand Down
7 changes: 0 additions & 7 deletions lib/Mojo/Server.pm
Expand Up @@ -51,13 +51,6 @@ EOF
return $app;
}

# DEPRECATED in Smiling Face With Sunglasses!
sub on_request {
warn
"Mojo::Server->on_request is DEPRECATED in favor of Mojo::Server->on!\n";
shift->on(request => shift);
}

# "Are you saying you're never going to eat any animal again? What about
# bacon?
# No.
Expand Down
19 changes: 1 addition & 18 deletions lib/Mojo/Transaction.pm
Expand Up @@ -47,22 +47,6 @@ sub is_writing {
return $state ~~ [qw/write write_start_line write_headers write_body/];
}

# DEPRECATED in Smiling Face With Sunglasses!
sub on_finish {
warn <<EOF;
Mojo::Transaction->on_finish is DEPRECATED in favor of Mojo::Transaction->on!
EOF
shift->on(finish => shift);
}

# DEPRECATED in Smiling Face With Sunglasses!
sub on_resume {
warn <<EOF;
Mojo::Transaction->on_resume is DEPRECATED in favor of Mojo::Transaction->on!
EOF
shift->on(resume => shift);
}

sub remote_address {
my ($self, $address) = @_;

Expand Down Expand Up @@ -125,8 +109,7 @@ L<Mojo::Transaction> can emit the following events.
...
});
Emitted when a connection has been assigned to transaction. Note that this
event is EXPERIMENTAL and might change without warning!
Emitted when a connection has been assigned to transaction.
=head2 C<finish>
Expand Down
9 changes: 0 additions & 9 deletions lib/Mojo/Transaction/HTTP.pm
Expand Up @@ -91,15 +91,6 @@ sub keep_alive {
return 1;
}

# DEPRECATED in Smiling Face With Sunglasses!
sub on_request {
warn <<EOF;
Mojo::Transaction::HTTP->on_request is DEPRECATED in favor of
Mojo::Transaction::HTTP->on!
EOF
shift->on(request => shift);
}

sub server_leftovers {
my $self = shift;

Expand Down
14 changes: 2 additions & 12 deletions lib/Mojo/UserAgent.pm
Expand Up @@ -97,14 +97,6 @@ sub need_proxy {
return 1;
}

# DEPRECATED in Smiling Face With Sunglasses!
sub on_start {
warn <<EOF;
Mojo::UserAgent->on_start is DEPRECATED in favor of Mojo::UserAgent->on!
EOF
shift->on(start => shift);
}

sub post_form {
my $self = shift;
$self->start($self->build_form_tx(@_));
Expand Down Expand Up @@ -641,8 +633,7 @@ L<Mojo::UserAgent> can emit the following events.
...
});
Emitted if an error happens that can't be associated with a transaction. Note
that this event is EXPERIMENTAL and might change without warning!
Emitted if an error happens that can't be associated with a transaction.
$ua->on(error => sub {
my ($ua, $err) = @_;
Expand Down Expand Up @@ -682,8 +673,7 @@ environment variable.
$ua = $ua->connect_timeout(5);
Maximum amount of time in seconds establishing a connection may take,
defaults to C<3>. Note that this attribute is EXPERIMENTAL and might change
without warning!
defaults to C<3>.
=head2 C<cookie_jar>
Expand Down
5 changes: 1 addition & 4 deletions t/pod_coverage.t
Expand Up @@ -7,9 +7,6 @@ plan skip_all => 'Test::Pod::Coverage 1.04 required for this test!'
plan skip_all => 'set TEST_POD to enable this test (developer only!)'
unless $ENV{TEST_POD};

# DEPRECATED in Smiling Face With Sunglasses!
my @sunglasses = (qw/on_progress on_read on_request on_resume on_start/);

# DEPRECATED in Leaf Fluttering In Wind!
my @leaf = (
qw/add_hook comment connect connection_timeout is_done keep_alive_timeout/,
Expand All @@ -19,4 +16,4 @@ my @leaf = (

# "Marge, I'm going to miss you so much. And it's not just the sex.
# It's also the food preparation."
all_pod_coverage_ok({also_private => ['inet_pton', @leaf, @sunglasses]});
all_pod_coverage_ok({also_private => [@leaf]});

0 comments on commit da55fb3

Please sign in to comment.