Skip to content

Commit

Permalink
added a few spurt examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jul 16, 2012
1 parent 16877e7 commit f7b258d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/Mojo/ByteStream.pm
Expand Up @@ -284,6 +284,8 @@ Alias for L<Mojo::Util/"slurp">.
Alias for L<Mojo::Util/"spurt">.
b('/home/sri/foo.html')->slurp->html_unescape->spurt("/home/sri/bar.html");
=head2 C<split>
my $collection = $stream->split(',');
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Util.pm
Expand Up @@ -571,7 +571,7 @@ Read all data at once from file.
=head2 C<spurt>
spurt $content, '/etc/passwd';
$content = spurt $content, '/etc/passwd';
Write all data at once to file.
Expand Down
2 changes: 1 addition & 1 deletion lib/ojo.pm
Expand Up @@ -159,7 +159,7 @@ L<Mojo::Message::Response> object.
Encode Perl data structure or decode JSON with L<Mojo::JSON>.
$ perl -Mojo -E 'say j({hello => "world!"})'
$ perl -Mojo -E 'b(j({hello => "world!"}))->spurt("/home/sri/hello.json")'
=head2 C<o>
Expand Down

0 comments on commit f7b258d

Please sign in to comment.