Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
better progress event examples
  • Loading branch information
kraih committed Apr 3, 2012
1 parent 5682c12 commit 2956250
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
This file documents the revision history for Perl extension Mojolicious.

2.74 2012-04-04
- Improved documentation.

2.73 2012-04-03
- Improved documentation.
- Improved tests.
Expand Down
7 changes: 7 additions & 0 deletions lib/Mojo/Message.pm
Expand Up @@ -498,6 +498,13 @@ Emitted after message building or parsing is finished.
Emitted when message building or parsing makes progress.
# Building
$message->on(progress => sub {
my ($message, $state, $offset) = @_;
say qq/Building "$state" at offset $offset/;
});
# Parsing
$message->on(progress => sub {
my $message = shift;
return unless my $len = $message->headers->content_length;
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -33,7 +33,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Leaf Fluttering In Wind';
our $VERSION = '2.73';
our $VERSION = '2.74';

# "These old doomsday devices are dangerously unstable.
# I'll rest easier not knowing where they are."
Expand Down

0 comments on commit 2956250

Please sign in to comment.