Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Inline CPAN distribution.

Report information
The Basics
Id: 16801
Status: resolved
Priority: 0/
Queue: Inline

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: $_ is not localized
sorry that i have only a test with HTML::Template::JIT. the bug seems to happen in check_config_file() and check_module(). it happens when i call: use Inline C => Config => OPTIMIZE => "-O3", DIRECTORY => "/tmp/jit/455ce047453cd06516bb707b7c22f6d4" ; I posted this as a bug to HTML::Template::JIT (see http://rt.cpan.org/NoAuth/Bug.html?id=16800): This is perl, v5.8.6 built for i686-linux Linux lux 2.6.4-52-default #1 Wed Apr 7 02:08:30 UTC 2004 i686 athlon i386 GNU/Linux after creating a template, $_ is set to a new value: $ perl -wle' use HTML::Template::JIT; my $t = HTML::Template::JIT->new( filename => "examples/test.htc", jit_path=>"/tmp/jit", ); $t->param({foo => 23}); print $_; $t->output; print $_; ' version : 5.8.6 version : 5.8.6
After some communication today I repeated my test and found a couple of lines which need to local()ize $_. Attached is a diff of Inline/ denter.pm. regards, tina
--- /home/tina/perl/Inline/denter.pm 2008-11-01 07:00:03.000000000 +0100 +++ /tmp/lib/Inline/denter.pm 2008-11-30 01:22:48.000000000 +0100 @@ -179,7 +179,7 @@ sub _next_line { my $o = shift; $o->{done}++, $o->{level} = -1, return unless @{$o->{lines}}; - $_ = shift @{$o->{lines}}; + local $_ = shift @{$o->{lines}}; $o->{line}++; } @@ -188,7 +188,7 @@ $o->{done}++, $o->{level} = -1, return unless @{$o->{lines}}; my ($width, $tabwidth) = @{$o}{qw(width tabwidth)}; while (1) { - $_ = $o->{lines}[0]; + local $_ = $o->{lines}[0]; # expand tabs in leading whitespace; $o->next_line, next if /^(\s*$|\#)/; # skip comments and blank lines while (s{^( *)(\t+)} @@ -211,7 +211,7 @@ my $stream = ''; $o->{key} = ''; while (@_) { - $_ = shift; + local $_ = shift; $stream .= $o->indent_name($_, shift), next if (/^\*$package\::\w+$/); $stream .= $o->indent_data($_); @@ -221,7 +221,7 @@ sub indent_data { my $o = shift; - $_ = shift; + local $_ = shift; return $o->indent_undef($_) if not defined; return $o->indent_value($_)
Fixed in Inline-0.45