Skip to content

Commit

Permalink
more Mojo::ByteStream examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 19, 2015
1 parent 46e3754 commit f11624e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

5.73 2015-01-19
5.73 2015-01-20
- Deprecated Mojolicious::Routes::Route::bridge in favor of
Mojolicious::Routes::Route::under.
- Deprecated Mojolicious::Controller::render_exception in favor of
Expand Down
10 changes: 7 additions & 3 deletions lib/Mojo/ByteStream.pm
Expand Up @@ -149,7 +149,7 @@ Decamelize bytestream with L<Mojo::Util/"decamelize">.
$stream = $stream->decode;
$stream = $stream->decode('iso-8859-1');
Decode bytestream with L<Mojo::Util/"decode">, defaults to C<UTF-8>.
Decode bytestream with L<Mojo::Util/"decode">, defaults to using C<UTF-8>.
$stream->decode('UTF-16LE')->unquote->trim->say;
Expand All @@ -158,7 +158,7 @@ Decode bytestream with L<Mojo::Util/"decode">, defaults to C<UTF-8>.
$stream = $stream->encode;
$stream = $stream->encode('iso-8859-1');
Encode bytestream with L<Mojo::Util/"encode">, defaults to C<UTF-8>.
Encode bytestream with L<Mojo::Util/"encode">, defaults to using C<UTF-8>.
$stream->trim->quote->encode->say;
Expand Down Expand Up @@ -219,7 +219,7 @@ Quote bytestream with L<Mojo::Util/"quote">.
$stream = $stream->say;
$stream = $stream->say(*STDERR);
Print bytestream to handle and append a newline, defaults to C<STDOUT>.
Print bytestream to handle and append a newline, defaults to using C<STDOUT>.
=head2 secure_compare
Expand Down Expand Up @@ -293,6 +293,8 @@ Alias for L<Mojo::Base/"tap">.
Escape POSIX control characters in bytestream with
L<Mojo::Util/"term_escape">.
b('foo')->sha1_bytes->term_escape->say;
=head2 to_string
my $str = $stream->to_string;
Expand Down Expand Up @@ -350,6 +352,8 @@ bytestream with L<Mojo::Util/"xml_escape">.
XOR encode bytestream with L<Mojo::Util/"xor_encode">.
b('foo bar')->xor_encode('baz')->url_escape->say;
=head1 OPERATORS
L<Mojo::ByteStream> overloads the following operators.
Expand Down

0 comments on commit f11624e

Please sign in to comment.