This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: Added documentation changes
[perl5.git] / utils / c2ph.PL
index 9cb8937..13389ec 100644 (file)
@@ -369,13 +369,13 @@ $DEFINES = '';
 
 $perl++ if $0 =~ m#/?c2ph$#;
 
-require 'getopts.pl';
+use Getopt::Std qw(getopts);
 
 use File::Temp 'tempdir';
 
 eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_]+=)(.*)/ && shift;
 
-&Getopts('aixdpvtnws:') || &usage(0);
+getopts('aixdpvtnws:') || &usage(0);
 
 $opt_d && $debug++;
 $opt_t && $trace++;
@@ -394,7 +394,7 @@ eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_]+=)(.*)/ && shift;
 
 sub PLUMBER {
     select(STDERR);
-    print "oops, apperent pager foulup\n";
+    print "oops, apparent pager foulup\n";
     $isatty++;
     &usage(1);
 }
@@ -468,7 +468,7 @@ EOF
            $CC $CFLAGS $DEFINES
     and the resulting *.s groped for stab information.  If no files are
     supplied, then stdin is read directly with the assumption that it
-    contains stab information.  All other liens will be ignored.  At
+    contains stab information.  All other lines will be ignored.  At
     most one *.s file should be supplied.
 
 EOF
@@ -1320,7 +1320,7 @@ EOF
        $intrinsics{$_[1]} = $template{$_[0]};
     }
     close(PIPE) || die "couldn't read intrinsics!";
-    unlink($TMP, '$SAFEDIR/a.out');
+    unlink($TMP, "$SAFEDIR/a.out");
     print STDERR "done\n" if $trace;
 }
 
@@ -1435,9 +1435,9 @@ sub repeat_template {
 close OUT or die "Can't close $file: $!";
 chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
 unlink 'pstruct';
-print "Linking c2ph to pstruct.\n";
+print "Linking $file to pstruct.\n";
 if (defined $Config{d_link}) {
-  link 'c2ph', 'pstruct';
+    link $file, 'pstruct';
 } else {
   unshift @INC, '../lib';
   require File::Copy;