[Templates-cvs] cvs commit: Template2/t fileline.t
cvs@template-toolkit.org
cvs@template-toolkit.org
cvs 06/10/22 10:23:16
Modified: t fileline.t
Log:
* updated comment wrt fileline eval bug - thanks to Andreas
Revision Changes Path
1.8 +9 -4 Template2/t/fileline.t
Index: fileline.t
===================================================================
RCS file: /template-toolkit/Template2/t/fileline.t,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- fileline.t 2006/05/30 15:53:48 1.7
+++ fileline.t 2006/10/22 10:23:15 1.8
@@ -12,7 +12,7 @@
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
-# $Id: fileline.t,v 1.7 2006/05/30 15:53:48 abw Exp $
+# $Id: fileline.t,v 1.8 2006/10/22 10:23:15 abw Exp $
#
#========================================================================
@@ -38,9 +38,14 @@
file => sub {
$warning =~ /at (.*?) line/;
my $file = $1;
- # Perl appears to report different (eval $line) line numbers
- # on FreeBSD, but it's not important to the success or failure
- # of the test, so we delete the line number
+ # The error returned includes a reference to the eval string
+ # e.g. ' ...at (eval 1) line 1'. On some platforms (notably
+ # FreeBSD and variants like OSX), the (eval $n) part contains
+ # a different number, presumably because it has previously
+ # performed additional string evals. It's not important to
+ # the success or failure of the test, so we delete it.
+ # Thanks to Andreas Koenig for identifying the problem.
+ # http://rt.cpan.org/Public/Bug/Display.html?id=20807
$file =~ s/eval\s+\d+/eval/;
return $file;
},