diff options
Diffstat (limited to 'utils/h2xs.PL')
-rw-r--r-- | utils/h2xs.PL | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/utils/h2xs.PL b/utils/h2xs.PL index f9063cbc4e..92dce0d346 100644 --- a/utils/h2xs.PL +++ b/utils/h2xs.PL @@ -18,7 +18,7 @@ chdir dirname($0); my $file = basename($0, '.PL'); $file .= '.com' if $^O eq 'VMS'; -open OUT,">$file" or die "Can't create $file: $!"; +open OUT, ">", $file or die "Can't create $file: $!"; print "Extracting $file (with variable substitutions)\n"; @@ -842,7 +842,7 @@ if( @path_h ){ # Scan the header file (we should deal with nested header files) # Record the names of simple #define constants into const_names # Function prototypes are processed below. - open(CH, "<$rel_path_h") || die "Can't open $rel_path_h: $!\n"; + open(CH, "<", "$rel_path_h") || die "Can't open $rel_path_h: $!\n"; defines: while (<CH>) { if ($pre_sub_tri_graphs) { @@ -975,7 +975,7 @@ if( ! $opt_X ){ # use XS, unless it was disabled Devel::PPPort::WriteFile('ppport.h') || die "Can't create $ext$modpname/ppport.h: $!\n"; } - open(XS, ">$modfname.xs") || die "Can't create $ext$modpname/$modfname.xs: $!\n"; + open(XS, ">", "$modfname.xs") || die "Can't create $ext$modpname/$modfname.xs: $!\n"; if ($opt_x) { warn "Scanning typemaps...\n"; get_typemap(); @@ -1093,7 +1093,7 @@ for (sort(keys(%const_names))) { } -d $modpmdir || mkpath([$modpmdir], 0, 0775); -open(PM, ">$modpmname") || die "Can't create $ext$modpname/$modpmname: $!\n"; +open(PM, ">", "$modpmname") || die "Can't create $ext$modpname/$modpmname: $!\n"; $" = "\n\t"; warn "Writing $ext$modpname/$modpmname\n"; @@ -1779,7 +1779,7 @@ sub get_typemap { warn " Scanning $typemap\n"; warn("Warning: ignoring non-text typemap file '$typemap'\n"), next unless -T $typemap ; - open(TYPEMAP, $typemap) + open(TYPEMAP, "<", $typemap) or warn ("Warning: could not open typemap file '$typemap': $!\n"), next; my $mode = 'Typemap'; while (<TYPEMAP>) { @@ -1872,7 +1872,7 @@ close XS; if (%types_seen) { my $type; warn "Writing $ext$modpname/typemap\n"; - open TM, ">typemap" or die "Cannot open typemap file for write: $!"; + open TM, ">", "typemap" or die "Cannot open typemap file for write: $!"; for $type (sort keys %types_seen) { my $entry = assign_typemap_entry $type; @@ -1906,7 +1906,7 @@ EOP } # if( ! $opt_X ) warn "Writing $ext$modpname/Makefile.PL\n"; -open(PL, ">Makefile.PL") || die "Can't create $ext$modpname/Makefile.PL: $!\n"; +open(PL, ">", "Makefile.PL") || die "Can't create $ext$modpname/Makefile.PL: $!\n"; my $prereq_pm = ''; @@ -2032,7 +2032,7 @@ close(PL) || die "Can't close $ext$modpname/Makefile.PL: $!\n"; # Create a simple README since this is a CPAN requirement # and it doesn't hurt to have one warn "Writing $ext$modpname/README\n"; -open(RM, ">README") || die "Can't create $ext$modpname/README:$!\n"; +open(RM, ">", "README") || die "Can't create $ext$modpname/README:$!\n"; my $thisyear = (gmtime)[5] + 1900; my $rmhead = "$modpname version $TEMPLATE_VERSION"; my $rmheadeq = "=" x length($rmhead); @@ -2099,7 +2099,7 @@ unless (-d "$testdir") { warn "Writing $ext$modpname/$testfile\n"; my $tests = @const_names ? 2 : 1; -open EX, ">$testfile" or die "Can't create $ext$modpname/$testfile: $!\n"; +open EX, ">", "$testfile" or die "Can't create $ext$modpname/$testfile: $!\n"; print EX <<_END_; # Before 'make install' is performed this script should be runnable with @@ -2205,7 +2205,7 @@ close(EX) || die "Can't close $ext$modpname/$testfile: $!\n"; unless ($opt_C) { warn "Writing $ext$modpname/Changes\n"; $" = ' '; - open(EX, ">Changes") || die "Can't create $ext$modpname/Changes: $!\n"; + open(EX, ">", "Changes") || die "Can't create $ext$modpname/Changes: $!\n"; @ARGS = map {/[\s\"\'\`\$*?^|&<>\[\]\{\}\(\)]/ ? "'$_'" : $_} @ARGS; print EX <<EOP; Revision history for Perl extension $module. @@ -2219,7 +2219,7 @@ EOP } warn "Writing $ext$modpname/MANIFEST\n"; -open(MANI,'>MANIFEST') or die "Can't create MANIFEST: $!"; +open(MANI, '>', 'MANIFEST') or die "Can't create MANIFEST: $!"; my @files = grep { -f } (<*>, <t/*>, <$fallbackdirname/*>, <$modpmdir/*>); if (!@files) { eval {opendir(D,'.');}; |