Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vti committed Jan 9, 2015
1 parent 7045061 commit a2510fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Text/Haml.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ BEGIN {
last;
}
}
*_DEFAULT_CACHE_DIR = sub () { $cache_dir };
use constant _DEFAULT_CACHE_DIR => $cache_dir;
}

my $ESCAPE = {
Expand Down Expand Up @@ -597,7 +597,7 @@ EOF
$level -= 2 * $in_block if $in_block;

my $offset = '';
$offset .= ' ' x $level;
$offset .= ' ' x $level if $level > 0;

my $escape = '';
if ( (!exists $el->{escape} && $self->escape_html)
Expand Down Expand Up @@ -631,7 +631,7 @@ EOF
while (my $poped = pop @$stack) {
my $level = $poped->{level};
$level -= 2 * $in_block if $in_block;
my $poped_offset = ' ' x $level;
my $poped_offset = $level > 0 ? ' ' x $level : '';

my $ending = '';
if ($poped->{type} eq 'tag') {
Expand Down Expand Up @@ -965,7 +965,7 @@ sub _parse_interpolation {

return '' unless @parts;

return '" . ' . join('.', map {s/\\\\#\\{/#\\{/; $_} @parts) . '."';
return '" . ' . join('.', map {s/\\\\#\\\{/#\\\{/; $_} @parts) . '."';
}

sub compile {
Expand Down

0 comments on commit a2510fd

Please sign in to comment.