Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 24, 2010
1 parent 576ba82 commit fd8f801
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/Template.pm
Expand Up @@ -30,15 +30,15 @@ __PACKAGE__->attr(trim_mark => '=');

# Helpers
my $HELPERS = <<'EOF';
use Mojo::ByteStream 'b';
use Mojo::ByteStream;
no strict 'refs'; no warnings 'redefine';
sub block;
*block = sub { shift->(@_) };
sub escape;
*escape = sub {
ref $_[0] && ref $_[0] eq 'Mojo::ByteStream'
? "$_[0]"
: b($_[0])->xml_escape->to_string;
: Mojo::ByteStream->new($_[0])->xml_escape->to_string;
};
use strict; use warnings;
EOF
Expand Down

0 comments on commit fd8f801

Please sign in to comment.