Changeset 26766
- Timestamp:
- 12/15/08 17:03:28 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Text-MicroTemplate/trunk/lib/Text/MicroTemplate.pm
r26764 r26766 304 304 # Debug goodness 305 305 sub _error { 306 my ($self, $error, $line_offset) = @_; 307 306 my ($self, $error, $line_offset, $from) = @_; 307 308 unless (defined $from) { 309 $from = sub { 310 my $i = 1; 311 while (my @c = caller($i++)) { 312 if ($c[0] ne __PACKAGE__) { 313 return "$c[1] at line $c[2]"; 314 } 315 } 316 ''; 317 }->(); 318 } 319 $from = ' passed from ' . $from; 320 308 321 # Line 309 322 if ($error =~ /^(.*)\s+at\s+\(eval\s+\d+\)\s+line\s+(\d+)/) { … … 311 324 my $line = $2 - $line_offset; 312 325 my $delim = '-' x 76; 313 314 my $from = sub {315 my $i = 1;316 while (my @c = caller($i++)) {317 if ($c[0] ne __PACKAGE__) {318 return " passed from $c[1] at line $c[2]";319 }320 }321 '';322 }->();323 326 324 327 my $report = "$reason at line $line of template$from.\n";
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)