Use three-arg open.
Ken Youens-Clark [Mon, 20 Apr 2009 21:21:48 +0000 (21:21 +0000)]
lib/SQL/Translator/Producer/GraphViz.pm

index 232c784..95faab6 100644 (file)
@@ -626,7 +626,7 @@ sub produce {
             print $out_file $gv->$output_method;
         }
         else {
-            open my $fh, ">$out_file" or die "Can't write '$out_file': $!\n";
+            open my $fh, '>', $out_file or die "Can't write '$out_file': $!\n";
             binmode $fh;
             print $fh $gv->$output_method;
             close $fh;