r13918@rob-kinyons-powerbook58: rob | 2006-06-02 10:04:04 -0400
[p5sagit/Excel-Template.git] / lib / Excel / Template.pm
index 1b686d1..571eac2 100644 (file)
@@ -6,7 +6,7 @@ BEGIN {
     use Excel::Template::Base;
     use vars qw ($VERSION @ISA);
 
-    $VERSION  = '0.24';
+    $VERSION  = '0.26';
     @ISA      = qw( Excel::Template::Base );
 }
 
@@ -202,9 +202,17 @@ sub parse_xml
  
         push @parms, Base => $dirname;
 
-        open( INFILE, "<$file" )
-            || die "Cannot open '$file' for reading: $!\n";
-
+        eval q{
+            open( INFILE, '<', $file )
+                || die "Cannot open '$file' for reading: $!\n";
+        }; if ( $@ ) {
+           if ( $@ =~ /Too many arguments for open/ ) {
+                open( INFILE, "< $file" )
+                    || die "Cannot open '$file' for reading: $!\n";
+            } else {
+                die $@;
+            }
+        }
     }
 
     my $parser = XML::Parser->new( @parms );