Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use a more realistic example for cookie filtering
  • Loading branch information
kraih committed Sep 13, 2015
1 parent 028f083 commit a4fe6ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Mojo/UserAgent/CookieJar.pm
Expand Up @@ -160,11 +160,12 @@ value.
my $ignore = $jar->ignore;
$jar = $jar->ignore(sub {...});
A callback used to decide if a cookie should be ignored.
A callback used to decide if a cookie should be ignored by L</"collect">.
$jar->ignore(sub {
my $cookie = shift;
return $cookie->domain =~ /^\.?com$/;
return undef unless my $domain = $cookie->domain;
return $domain eq 'com';
});
=head2 max_cookie_size
Expand Down

0 comments on commit a4fe6ff

Please sign in to comment.