From: Peter Rabbitson Date: Mon, 4 May 2009 06:37:06 +0000 (+0000) Subject: Rewind exhausted globs before attempting a read X-Git-Tag: v0.11008~163^2~15 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ca96e7ee3629e553cb11d6c1fdec19cd7dc52c71;p=dbsrgits%2FSQL-Translator.git Rewind exhausted globs before attempting a read (on a side note all this IO::Scalar business is just silly, not touching because a rewrite is imminent anyway) --- diff --git a/lib/SQL/Translator.pm b/lib/SQL/Translator.pm index e089e70..99e250d 100644 --- a/lib/SQL/Translator.pm +++ b/lib/SQL/Translator.pm @@ -318,6 +318,7 @@ sub data { $data = join '', @$data; } elsif (isa($data, 'GLOB')) { + seek ($data, 0, 0) if eof ($data); local $/; $data = <$data>; }