-
-
Save anonymous/e1575625777cbe649383b0eb844dd28c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
package Mojo::ByteStream::Role::Escape; | |
use Role::Tiny; | |
use HTML::Entities(); | |
sub html_escape { HTML::Entities::encode_entities(shift) } | |
1; | |
package main; | |
use Mojo::Base -strict; | |
use Mojo::ByteStream; | |
warn Mojo::ByteStream->with_roles('Mojo::ByteStream::Role::Escape')->new('All your møøse are belong to me')->html_escape; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment