Not sure if this is bug as such but I've found that Datafile.pm on linux
wasn't removing the \r from the end of ascii files created on a Windows PC
resulting in unexpected behaviour. Here's a patch (created as per
Template::Manual::Internals although it seems a bit of overkill for 2
lines :)
------ Patch begins ------
--- Datafile-2.06d.pm Fri Feb 15 00:02:42 2002
+++ Datafile-new.pm Fri Feb 15 00:03:59 2002
@@ -55,6 +55,7 @@
while (! $line || $line =~ /^#/) {
$line = <FD>;
chomp $line;
+ $line = s/\r$//;
}
(@fields = split(/\s*$delim\s*/, $line))
|| return $class->fail("first line of file must contain field
names");
@@ -62,6 +63,7 @@
# read each line of the file
while (<FD>) {
chomp;
+ s/\r$//;
# ignore comments and blank lines
next if /^#/ || /^\s*$/;
@@ -182,4 +184,4 @@
=head1 SEE ALSO
-L<Template::Plugin|Template::Plugin>
\ No newline at end of file
+L<Template::Plugin|Template::Plugin>
------- Patch ends -------
Simon.
--
"Fiiiive Gooooold Riiings!"