Skip to content

Commit

Permalink
removed Mojo::Template workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 17, 2012
1 parent f2782f2 commit d8d1fe4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
4 changes: 1 addition & 3 deletions Changes
@@ -1,6 +1,6 @@
This file documents the revision history for Perl extension Mojolicious.

2.50 2012-02-17 00:00:00
2.50 2012-02-18 00:00:00
- Added EXPERIMENTAL is_running method to Mojo::IOWatcher and
Mojo::IOWatcher::EV.
- Added file upload support to param method in
Expand All @@ -11,8 +11,6 @@ This file documents the revision history for Perl extension Mojolicious.
Mojo::Message.
- Improved resilience of Mojo::IOLoop::Client.
- Improved documentation.
- Fixed inconsistency between expressions and escaped expressions in
Mojo::Template.
- Fixed small bugs in makefile command. (tempire, marcus, sri)

2.49 2012-02-13 00:00:00
Expand Down
1 change: 0 additions & 1 deletion lib/Mojo/Template.pm
Expand Up @@ -38,7 +38,6 @@ sub capture;
*capture = sub { shift->(@_) };
sub escape;
*escape = sub {
return scalar @_ if @_ > 1;
return $_[0] if ref $_[0] && ref $_[0] eq 'Mojo::ByteStream';
no warnings 'uninitialized';
Mojo::Util::xml_escape "$_[0]";
Expand Down
11 changes: 3 additions & 8 deletions t/mojo/template.t
Expand Up @@ -17,7 +17,7 @@ use Mojo::Base -strict;

use utf8;

use Test::More tests => 200;
use Test::More tests => 199;

use File::Spec::Functions qw/catfile splitdir/;
use File::Temp;
Expand All @@ -27,14 +27,9 @@ use FindBin;
# like God must feel when he's holding a gun."
use_ok 'Mojo::Template';

# Consistent scalar context
my $mt = Mojo::Template->new;
my $output = $mt->render('<%= @{[qw/a b c/]} %>:<%== @{[qw/a b c/]} %>');
is $output, "3:3\n", 'same context';

# Trim tag
$mt = Mojo::Template->new;
$output = $mt->render(" ♥ <%= 'test♥' =%> \n");
my $mt = Mojo::Template->new;
my $output = $mt->render(" ♥ <%= 'test♥' =%> \n");
is $output, ' ♥test♥', 'tag trimmed';

# Trim expression
Expand Down

0 comments on commit d8d1fe4

Please sign in to comment.