Skip to content

Commit

Permalink
documentation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 5, 2012
1 parent 1ea7c4c commit fb14073
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions lib/Mojo/IOLoop.pm
Expand Up @@ -177,6 +177,9 @@ sub stream {
my $self = shift;
$self = $self->singleton unless ref $self;

# Make sure garbage gets collected
$self->_cleaner;

# Connect stream with reactor
my $stream = shift;
return $self->_stream($stream, $self->_id) if blessed $stream;
Expand Down Expand Up @@ -272,9 +275,6 @@ sub _remove {
sub _stream {
my ($self, $stream, $id) = @_;

# Make sure garbage gets collected
$self->_cleaner;

# Connect stream with reactor
$self->{connections}->{$id}->{stream} = $stream;
weaken $stream->reactor($self->reactor)->{reactor};
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Message/Request.pm
Expand Up @@ -365,9 +365,9 @@ Direct access to the C<CGI> or C<PSGI> environment hash if available.
=head2 C<method>
my $method = $req->method;
$req = $req->method('GET');
$req = $req->method('POST');
HTTP request method.
HTTP request method, defaults to C<GET>.
=head2 C<url>
Expand Down
7 changes: 2 additions & 5 deletions lib/Mojo/UserAgent.pm
Expand Up @@ -195,9 +195,7 @@ sub _connect {
}

# CONNECT request to proxy required
return
if ($tx->req->method || '') ne 'CONNECT'
&& $self->_connect_proxy($tx, $cb);
return if $tx->req->method ne 'CONNECT' && $self->_connect_proxy($tx, $cb);

# Connect
warn "NEW CONNECTION ($scheme:$host:$port)\n" if DEBUG;
Expand Down Expand Up @@ -406,8 +404,7 @@ sub _remove {

# Keep connection alive
$self->_cache(join(':', $self->transactor->peer($tx)), $id)
unless (($tx->req->method || '') eq 'CONNECT'
&& ($tx->res->code || '') eq '200');
unless $tx->req->method eq 'CONNECT' && ($tx->res->code || '') eq '200';
}

sub _redirect {
Expand Down

0 comments on commit fb14073

Please sign in to comment.