Skip to content

Commit

Permalink
removed experimental status from many classes, helpers, attributes an…
Browse files Browse the repository at this point in the history
…d methods (closes #295)
  • Loading branch information
kraih committed Mar 16, 2012
1 parent 8fe1119 commit cf2bd89
Show file tree
Hide file tree
Showing 32 changed files with 119 additions and 144 deletions.
53 changes: 52 additions & 1 deletion Changes
@@ -1,6 +1,57 @@
This file documents the revision history for Perl extension Mojolicious.

2.62 2012-03-15 00:00:00
2.62 2012-03-16 00:00:00
- Removed experimental status from Mojo::Cache.
- Removed experimental status from Mojo::DOM::CSS.
- Removed experimental status from Mojo::DOM::HTML.
- 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 t helper in
Mojolicious::Plugin::TagHelpers.
- Removed experimental status from url_with helper 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 cache attribute in
Mojolicious::Routes.
- Removed experimental status from send method in
Mojolicious::Controller.
- Removed experimental status from finish_ok, message_is,
message_isnt, message_like, message_unlike, send_ok and
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 emit_safe method in
Mojo::EventEmitter.
- Removed experimental status from to_psgi_app method in
Mojo::Server::PSGI.
- Removed experimental status from clone method in
Mojo::Message::Request.
- Removed experimental status from has_conditions, has_custom_name,
has_websocket, is_websocket and websocket methods in
Mojolicious::Routes.
- Removed experimental status from clone, is_limit_exceeded and
max_line_size methods in Mojo::Headers.
- Removed experimental status from text_after, text_before and xml
methods, as well as trim arguments in Mojo::DOM.
- Removed experimental status from boundary, charset, clone,
is_dynamic, progress and max_leftover_size methods in
Mojo::Content.
- Removed experimental status from clone method in
Mojo::Content::MultiPart.
- Removed experimental status from clone method in
Mojo::Content::Single.
- Removed experimental status from is_dynamic, is_limit_exceeded and
max_line_size methods in Mojo::Message.
- Improved Mojo::IOWatcher exception handling a little.
- Improved Mojolicious::Routes logging.
- Improved documentation.
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojo/Cache.pm
Expand Up @@ -42,8 +42,7 @@ Mojo::Cache - Naive in-memory cache
=head1 DESCRIPTION
L<Mojo::Cache> is a naive in-memory cache with size limits. Note that this
module is EXPERIMENTAL and might change without warning!
L<Mojo::Cache> is a naive in-memory cache with size limits.
=head1 ATTRIBUTES
Expand Down
16 changes: 5 additions & 11 deletions lib/Mojo/Content.pm
Expand Up @@ -476,7 +476,6 @@ Content headers, defaults to a L<Mojo::Headers> object.
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>.
Note that this attribute is EXPERIMENTAL and might change without warning!
=head2 C<relaxed>
Expand Down Expand Up @@ -507,8 +506,7 @@ Content size in bytes.
my $boundary = $content->boundary;
Extract multipart boundary from C<Content-Type> header. Note that this method
is EXPERIMENTAL and might change without warning!
Extract multipart boundary from C<Content-Type> header.
=head2 C<build_body>
Expand All @@ -526,15 +524,13 @@ Render all headers.
my $charset = $content->charset;
Extract charset from C<Content-Type> header. Note that this method is
EXPERIMENTAL and might change without warning!
Extract charset from C<Content-Type> header.
=head2 C<clone>
my $clone = $content->clone;
Clone content if possible, otherwise return C<undef>. Note that this method
is EXPERIMENTAL and might change without warning!
Clone content if possible, otherwise return C<undef>.
=head2 C<generate_body_chunk>
Expand Down Expand Up @@ -577,8 +573,7 @@ Check if content is chunked.
my $success = $content->is_dynamic;
Check if content will be dynamically generated, which prevents C<clone> from
working. Note that this method is EXPERIMENTAL and might change without
warning!
working.
=head2 C<is_finished>
Expand Down Expand Up @@ -634,8 +629,7 @@ Parse chunk and stop after headers.
my $size = $content->progress;
Size of content already received from message in bytes. Note that this method
is EXPERIMENTAL and might change without warning!
Size of content already received from message in bytes.
=head2 C<write>
Expand Down
15 changes: 5 additions & 10 deletions lib/Mojo/Content/MultiPart.pm
Expand Up @@ -85,8 +85,7 @@ sub build_boundary {
sub clone {
my $self = shift;
return unless my $clone = $self->SUPER::clone();
$clone->parts($self->parts);
return $clone;
return $clone->parts($self->parts);
}

sub get_body_chunk {
Expand Down Expand Up @@ -177,8 +176,7 @@ sub _parse_multipart_body {
# Store chunk
my $chunk = substr $self->{multipart}, 0, $pos, '';
$self->parts->[-1] = $self->parts->[-1]->parse($chunk);
$self->{multi_state} = 'multipart_boundary';
return 1;
return $self->{multi_state} = 'multipart_boundary';
}

sub _parse_multipart_boundary {
Expand All @@ -191,8 +189,7 @@ sub _parse_multipart_boundary {
# New part
$self->emit(part => my $part = Mojo::Content::Single->new(relaxed => 1));
push @{$self->parts}, $part;
$self->{multi_state} = 'multipart_body';
return 1;
return $self->{multi_state} = 'multipart_body';
}

# Boundary ends
Expand All @@ -216,8 +213,7 @@ sub _parse_multipart_preamble {
substr $self->{multipart}, 0, $pos, "\x0d\x0a";

# Parse boundary
$self->{multi_state} = 'multipart_boundary';
return 1;
return $self->{multi_state} = 'multipart_boundary';
}

# No boundary yet
Expand Down Expand Up @@ -311,8 +307,7 @@ Generate a suitable boundary for content.
my $clone = $multi->clone;
Clone content if possible. Note that this method is EXPERIMENTAL and might
change without warning!
Clone content if possible, otherwise return C<undef>.
=head2 C<get_body_chunk>
Expand Down
11 changes: 3 additions & 8 deletions lib/Mojo/Content/Single.pm
Expand Up @@ -18,10 +18,7 @@ sub new {
return $self;
}

sub body_contains {
return 1 if shift->asset->contains(shift) >= 0;
return;
}
sub body_contains { shift->asset->contains(shift) >= 0 }

sub body_size {
my $self = shift;
Expand All @@ -32,8 +29,7 @@ sub body_size {
sub clone {
my $self = shift;
return unless my $clone = $self->SUPER::clone();
$clone->asset($self->asset);
return $clone;
return $clone->asset($self->asset);
}

sub get_body_chunk {
Expand Down Expand Up @@ -151,8 +147,7 @@ Content size in bytes.
my $clone = $single->clone;
Clone content if possible. Note that this method is EXPERIMENTAL and might
change without warning!
Clone content if possible, otherwise return C<undef>.
=head2 C<get_body_chunk>
Expand Down
15 changes: 5 additions & 10 deletions lib/Mojo/DOM.pm
Expand Up @@ -502,8 +502,7 @@ Construct a new L<Mojo::DOM> object.
my $untrimmed = $dom->all_text(0);
Extract all text content from DOM structure, smart whitespace trimming is
disabled by default. Note that the trim argument of this method is
EXPERIMENTAL and might change without warning!
disabled by default.
# "foo bar baz"
$dom->parse("<div>foo\n<p>bar</p>baz\n</div>")->div->all_text;
Expand Down Expand Up @@ -645,8 +644,7 @@ Find root node.
my $untrimmed = $dom->text(0);
Extract text content from element only (not including child elements), smart
whitespace trimming is disabled by default. Note that the trim argument of
this method is EXPERIMENTAL and might change without warning!
whitespace trimming is disabled by default.
# "foo baz"
$dom->parse("<div>foo\n<p>bar</p>baz\n</div>")->div->text;
Expand All @@ -660,8 +658,7 @@ this method is EXPERIMENTAL and might change without warning!
my $untrimmed = $dom->text_after(0);
Extract text content immediately following element, smart whitespace trimming
is disabled by default. Note that this method is EXPERIMENTAL and might
change without warning!
is disabled by default.
# "baz"
$dom->parse("<div>foo\n<p>bar</p>baz\n</div>")->div->p->text_after;
Expand All @@ -675,8 +672,7 @@ change without warning!
my $untrimmed = $dom->text_before(0);
Extract text content immediately preceding element, smart whitespace trimming
is disabled by default. Note that this method is EXPERIMENTAL and might
change without warning!
is disabled by default.
# "foo"
$dom->parse("<div>foo\n<p>bar</p>baz\n</div>")->div->p->text_before;
Expand Down Expand Up @@ -711,8 +707,7 @@ Element type.
my $xml = $dom->xml;
$dom = $dom->xml(1);
Alias for L<Mojo::DOM::HTML/"xml">. Note that this method is EXPERIMENTAL and
might change without warning!
Alias for L<Mojo::DOM::HTML/"xml">.
=head1 CHILD ELEMENTS
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojo/DOM/CSS.pm
Expand Up @@ -421,8 +421,7 @@ Mojo::DOM::CSS - CSS3 selector engine
=head1 DESCRIPTION
L<Mojo::DOM::CSS> is the CSS3 selector engine used by L<Mojo::DOM>. Note that
this module is EXPERIMENTAL and might change without warning!
L<Mojo::DOM::CSS> is the CSS3 selector engine used by L<Mojo::DOM>.
=head1 SELECTORS
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojo/DOM/HTML.pm
Expand Up @@ -426,8 +426,7 @@ Mojo::DOM::HTML - HTML5/XML engine
=head1 DESCRIPTION
L<Mojo::DOM::HTML> is the HTML5/XML engine used by L<Mojo::DOM>. Note that
this module is EXPERIMENTAL and might change without warning!
L<Mojo::DOM::HTML> is the HTML5/XML engine used by L<Mojo::DOM>.
=head1 ATTRIBUTES
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojo/EventEmitter.pm
Expand Up @@ -132,8 +132,7 @@ Emit event.
$e = $e->emit_safe('foo');
$e = $e->emit_safe('foo', 123);
Emit event safely and emit C<error> event on failure. Note that this method
is EXPERIMENTAL and might change without warning!
Emit event safely and emit C<error> event on failure.
=head2 C<has_subscribers>
Expand Down
9 changes: 3 additions & 6 deletions lib/Mojo/Headers.pm
Expand Up @@ -222,8 +222,7 @@ L<Mojo::Headers> implements the following attributes.
$headers = $headers->max_line_size(1024);
Maximum line size in bytes, defaults to the value of the
C<MOJO_MAX_LINE_SIZE> environment variable or C<10240>. Note that this
attribute is EXPERIMENTAL and might change without warning!
C<MOJO_MAX_LINE_SIZE> environment variable or C<10240>.
=head1 METHODS
Expand Down Expand Up @@ -275,8 +274,7 @@ Shortcut for the C<Cache-Control> header.
my $clone = $headers->clone;
Clone headers. Note that this method is EXPERIMENTAL and might change without
warning!
Clone headers.
=head2 C<connection>
Expand Down Expand Up @@ -410,8 +408,7 @@ Check if header parser is finished.
my $success = $headers->is_limit_exceeded;
Check if a header has exceeded C<max_line_size>. Note that this method is
EXPERIMENTAL and might change without warning!
Check if a header has exceeded C<max_line_size>.
=head2 C<last_modified>
Expand Down
10 changes: 2 additions & 8 deletions lib/Mojo/Home.pm
Expand Up @@ -69,14 +69,8 @@ sub detect {

sub lib_dir {
my $self = shift;

# Directory found
my $parts = $self->{parts} || [];
my $path = catdir @$parts, 'lib';
return $path if -d $path;

# No lib directory
return;
my $path = catdir @{$self->{parts} || []}, 'lib';
return -d $path ? $path : undef;
}

sub list_files {
Expand Down
14 changes: 4 additions & 10 deletions lib/Mojo/Message.pm
Expand Up @@ -268,10 +268,7 @@ sub is_dynamic { shift->content->is_dynamic }

sub is_finished { (shift->{state} || '') eq 'finished' }

sub is_limit_exceeded {
return unless my $code = (shift->error)[1];
return $code ~~ [413, 431];
}
sub is_limit_exceeded { ((shift->error)[1] || '') ~~ [413, 431] }

sub is_multipart { shift->content->is_multipart }

Expand Down Expand Up @@ -739,8 +736,7 @@ Alias for L<Mojo::Content/"is_chunked">.
my $success = $message->is_dynamic;
Alias for L<Mojo::Content/"is_dynamic">. Note that this method is
EXPERIMENTAL and might change without warning!
Alias for L<Mojo::Content/"is_dynamic">.
=head2 C<is_finished>
Expand All @@ -752,8 +748,7 @@ Check if parser is finished.
my $success = $message->is_limit_exceeded;
Check if message has exceeded C<max_line_size> or C<max_message_size>. Note
that this method is EXPERIMENTAL and might change without warning!
Check if message has exceeded C<max_line_size> or C<max_message_size>.
=head2 C<is_multipart>
Expand Down Expand Up @@ -784,8 +779,7 @@ Alias for L<Mojo::Content/"leftovers">.
$message->max_line_size(1024);
Alias for L<Mojo::Headers/"max_line_size">. Note that this method is
EXPERIMENTAL and might change without warning!
Alias for L<Mojo::Headers/"max_line_size">.
=head2 C<param>
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojo/Message/Request.pm
Expand Up @@ -397,8 +397,7 @@ implements the following new ones.
my $clone = $req->clone;
Clone request if possible, otherwise return C<undef>. Note that this method
is EXPERIMENTAL and might change without warning!
Clone request if possible, otherwise return C<undef>.
=head2 C<cookies>
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojo/Server/Morbo.pm
Expand Up @@ -138,8 +138,7 @@ Mojo::Server::Morbo - DOOOOOOOOOOOOOOOOOOM!
L<Mojo::Server::Morbo> is a full featured self-restart capable non-blocking
I/O HTTP 1.1 and WebSocket server built around the very well tested and
reliable L<Mojo::Server::Daemon> with C<IPv6>, C<TLS>, C<Bonjour> and
C<libev> support. Note that this module is EXPERIMENTAL and might change
without warning!
C<libev> support.
To start applications with it you can use the L<morbo> script.
Expand Down

0 comments on commit cf2bd89

Please sign in to comment.