Skip to content

Commit

Permalink
deprecated Mojolicious::Routes::Route::has_conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 26, 2014
1 parent 1fa9f44 commit eea6404
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
3 changes: 2 additions & 1 deletion Changes
@@ -1,5 +1,6 @@

5.45 2014-09-27
5.45 2014-09-26
- Deprecated Mojolicious::Routes::Route::has_conditions.
- Added extracting attribute to Mojo::UserAgent::CookieJar.
- Improved performance of next, next_sibling, previous and previous_sibling
methods in Mojo::DOM significantly.
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojo/UserAgent.pm
Expand Up @@ -316,8 +316,7 @@ sub _start {
$url->scheme($base->scheme)->authority($base->authority);
}

$self->proxy->inject($tx);
if (my $jar = $self->cookie_jar) { $jar->inject($tx) }
$_ && $_->inject($tx) for $self->proxy, $self->cookie_jar;

# Connect and add request timeout if necessary
my $id = $self->emit(start => $tx)->_connection($nb, $tx, $cb);
Expand Down
9 changes: 3 additions & 6 deletions lib/Mojolicious/Routes/Route.pm
Expand Up @@ -58,7 +58,10 @@ sub find {

sub get { shift->_generate_route(GET => @_) }

# DEPRECATED in Tiger Face!
sub has_conditions {
Mojo::Util::deprecated
'Mojolicious::Routes::Route::has_conditions is DEPRECATED';
my $self = shift;
return 1 if @{$self->over || []};
return undef unless my $parent = $self->parent;
Expand Down Expand Up @@ -375,12 +378,6 @@ See also the L<Mojolicious::Lite> tutorial for many more argument variations.
$r->get('/user')->to('user#show');
=head2 has_conditions
my $bool = $r->has_conditions;
Check if this route has active conditions.
=head2 has_custom_name
my $bool = $r->has_custom_name;
Expand Down
2 changes: 1 addition & 1 deletion t/pod_coverage.t
Expand Up @@ -8,7 +8,7 @@ plan skip_all => 'Test::Pod::Coverage 1.04 required for this test!'
unless eval 'use Test::Pod::Coverage 1.04; 1';

# DEPRECATED in Tiger Face!
my @tiger = (qw(emit_safe render_static));
my @tiger = (qw(emit_safe has_conditions render_static));

# False positive constants
all_pod_coverage_ok({also_private => [qw(IPV6 TLS), @tiger]});

0 comments on commit eea6404

Please sign in to comment.