Skip to content

Commit

Permalink
remove deprecated collecting method from Mojo::UserAgent::CookieJar
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 2, 2015
1 parent 029683c commit d4c81de
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 18 deletions.
1 change: 1 addition & 0 deletions Changes
@@ -1,5 +1,6 @@

6.35 2015-12-02
- Removed deprecated collecting method from Mojo::UserAgent::CookieJar.
- Fixed warnings in Mojo::Cookie::Response.

6.34 2015-12-01
Expand Down
4 changes: 1 addition & 3 deletions lib/Mojo/UserAgent.pm
Expand Up @@ -98,9 +98,7 @@ sub _connect {
if ($proto eq 'socks') {
@options{qw(socks_address socks_port)} = @options{qw(address port)};
($proto, @options{qw(address port)}) = $t->endpoint($tx);
my $req = $tx->req;
my $userinfo = $req->proxy->userinfo;
$req->via_proxy(0);
my $userinfo = $tx->req->via_proxy(0)->proxy->userinfo;
@options{qw(socks_user socks_pass)} = split ':', $userinfo if $userinfo;
}

Expand Down
14 changes: 0 additions & 14 deletions lib/Mojo/UserAgent/CookieJar.pm
Expand Up @@ -3,7 +3,6 @@ use Mojo::Base -base;

use Mojo::Cookie::Request;
use Mojo::Path;
use Mojo::Util 'deprecated';

has 'ignore';
has max_cookie_size => 4096;
Expand Down Expand Up @@ -40,9 +39,6 @@ sub all {
sub collect {
my ($self, $tx) = @_;

# DEPRECATED in Clinking Beer Mugs!
return unless $self->{collecting} // 1;

my $url = $tx->req->url;
for my $cookie (@{$tx->res->cookies}) {

Expand All @@ -60,16 +56,6 @@ sub collect {
}
}

# DEPRECATED in Clinking Beer Mugs!
sub collecting {
deprecated 'Mojo::UserAgent::CookieJar::collecting is DEPRECATED in favor of'
. ' Mojo::UserAgent::CookieJar::ignore';
my $self = shift;
return $self->{collecting} //= 1 unless @_;
$self->{collecting} = shift;
return $self;
}

sub empty { delete shift->{jar} }

sub find {
Expand Down
2 changes: 1 addition & 1 deletion t/pod_coverage.t
Expand Up @@ -7,4 +7,4 @@ plan skip_all => 'set TEST_POD to enable this test (developer only!)'
plan skip_all => 'Test::Pod::Coverage 1.04+ required for this test!'
unless eval 'use Test::Pod::Coverage 1.04; 1';

all_pod_coverage_ok({also_private => [qw(collecting format_regex)]});
all_pod_coverage_ok({also_private => ['format_regex']});

0 comments on commit d4c81de

Please sign in to comment.