Skip to content

Commit

Permalink
fix attribute order
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 9, 2016
1 parent ca8316a commit cb3dbdd
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions lib/Mojo/Transaction/HTTP.pm
@@ -1,7 +1,7 @@
package Mojo::Transaction::HTTP;
use Mojo::Base 'Mojo::Transaction';

has [qw(previous next)];
has [qw(next previous)];

sub client_read {
my ($self, $chunk) = @_;
Expand Down Expand Up @@ -73,10 +73,8 @@ sub _body {
if (defined $buffer) { delete $self->{delay} }

# Delayed
else {
if (delete $self->{delay}) { $self->{state} = 'paused' }
else { $self->{delay} = 1 }
}
elsif (delete $self->{delay}) { $self->{state} = 'paused' }
else { $self->{delay} = 1 }

# Finished
$self->{state} = $finish ? 'finished' : 'read'
Expand Down Expand Up @@ -229,6 +227,14 @@ Emitted for unexpected C<1xx> responses that will be ignored.
L<Mojo::Transaction::HTTP> inherits all attributes from L<Mojo::Transaction>
and implements the following new ones.
=head2 next
my $next = $tx->next;
$tx = $tx->next(Mojo::Transaction::WebSocket->new);
Follow-up transaction for connections that get upgraded to a different protocol,
usually a L<Mojo::Transaction::WebSocket> object.
=head2 previous
my $previous = $tx->previous;
Expand All @@ -241,14 +247,6 @@ L<Mojo::Transaction::HTTP> object.
say $tx->previous->previous->req->url->path;
say $tx->previous->req->url->path;
=head2 next
my $next = $tx->next;
$tx = $tx->next(Mojo::Transaction::WebSocket->new);
Follow-up transaction for connections that will get upgraded, usually a
L<Mojo::Transaction::WebSocket> object.
=head1 METHODS
L<Mojo::Transaction::HTTP> inherits all methods from L<Mojo::Transaction> and
Expand Down

0 comments on commit cb3dbdd

Please sign in to comment.