summaryrefslogtreecommitdiff
path: root/utils/perlcc.PL
diff options
context:
space:
mode:
Diffstat (limited to 'utils/perlcc.PL')
-rw-r--r--utils/perlcc.PL7
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/perlcc.PL b/utils/perlcc.PL
index a8c6ab4fc0..734b20a667 100644
--- a/utils/perlcc.PL
+++ b/utils/perlcc.PL
@@ -257,20 +257,19 @@ sub _createCode
local($") = " -I";
- open(GENFILE, "> $generated_file") || die "Can't open $generated_file: $!";
-
if ($backend eq "Bytecode")
{
require ByteLoader;
+ open(GENFILE, "> $generated_file") || die "Can't open $generated_file: $!";
+ binmode GENFILE;
print GENFILE "#!$^X\n" if @_ == 3;
print GENFILE "use ByteLoader $ByteLoader::VERSION;\n";
+ close(GENFILE);
$output_switch ="a";
}
- close(GENFILE);
-
if (@_ == 3) # compiling a program
{
chmod $generated_file, 0777 & ~umask if $backend eq "Bytecode";