summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-03-17 10:18:21 +0000
committerCharles Bailey <bailey@genetics.upenn.edu>1996-03-17 10:18:21 +0000
commitf360dba143c864a53fdb1573b40795cfe2331220 (patch)
tree261c1c2d605178381f828a22d0dc812732babf5e
parent79dd614e1e8c3b0e4ed35016e6971240b606da64 (diff)
downloadperl-f360dba143c864a53fdb1573b40795cfe2331220.tar.gz
Use $^O
-rw-r--r--lib/ExtUtils/Mkbootstrap.pm4
-rw-r--r--lib/File/Path.pm3
-rw-r--r--pod/pod2html.PL3
-rw-r--r--pod/pod2man.PL18
-rw-r--r--pod/pod2text.PL3
-rwxr-xr-xt/lib/safe.t2
-rw-r--r--utils/h2ph.PL3
-rw-r--r--utils/pl2pm.PL3
-rw-r--r--x2p/find2perl.PL3
-rw-r--r--x2p/s2p.PL3
10 files changed, 19 insertions, 26 deletions
diff --git a/lib/ExtUtils/Mkbootstrap.pm b/lib/ExtUtils/Mkbootstrap.pm
index 1dbcf865f3..06c001553b 100644
--- a/lib/ExtUtils/Mkbootstrap.pm
+++ b/lib/ExtUtils/Mkbootstrap.pm
@@ -58,8 +58,6 @@ generated C<*.bs> file.
if (-f "${baseext}_BS"){
$_ = "${baseext}_BS";
package DynaLoader; # execute code as if in DynaLoader
- local($osname, $dlsrc) = (); # avoid warnings
- ($osname, $dlsrc) = @Config::Config{qw(osname dlsrc)};
$bscode = "";
unshift @INC, ".";
require $_;
@@ -78,7 +76,7 @@ generated C<*.bs> file.
or die "Unable to open $baseext.bs: $!";
print STDOUT "Writing $baseext.bs\n";
print STDOUT " containing: @all" if $Verbose;
- print BS "# $baseext DynaLoader bootstrap file for $Config{'osname'} architecture.\n";
+ print BS "# $baseext DynaLoader bootstrap file for $^O architecture.\n";
print BS "# Do not edit this file, changes will be lost.\n";
print BS "# This file was automatically generated by the\n";
print BS "# Mkbootstrap routine in ExtUtils::Mkbootstrap (v$Version).\n";
diff --git a/lib/File/Path.pm b/lib/File/Path.pm
index 8a17173b0d..97cb66855d 100644
--- a/lib/File/Path.pm
+++ b/lib/File/Path.pm
@@ -91,13 +91,12 @@ This module was last revised 14-Feb-1996, for perl 5.002. $VERSION is
$VERSION = "1.01"; # That's my hobby-horse, A.K.
require 5.000;
-use Config;
use Carp;
require Exporter;
@ISA = qw( Exporter );
@EXPORT = qw( mkpath rmtree );
-$Is_VMS = $Config{'osname'} eq 'VMS';
+$Is_VMS = $^O eq 'VMS';
sub mkpath {
my($paths, $verbose, $mode) = @_;
diff --git a/pod/pod2html.PL b/pod/pod2html.PL
index aee400df34..646190bddb 100644
--- a/pod/pod2html.PL
+++ b/pod/pod2html.PL
@@ -15,8 +15,7 @@ use File::Basename qw(&basename &dirname);
chdir(dirname($0));
($file = basename($0)) =~ s/\.PL$//;
$file =~ s/\.pl$//
- if ($Config{'osname'} eq 'VMS' or
- $Config{'osname'} eq 'OS2'); # "case-forgiving"
+ if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";
diff --git a/pod/pod2man.PL b/pod/pod2man.PL
index 0478a0b93b..d8f7cbb716 100644
--- a/pod/pod2man.PL
+++ b/pod/pod2man.PL
@@ -15,8 +15,7 @@ use File::Basename qw(&basename &dirname);
chdir(dirname($0));
($file = basename($0)) =~ s/\.PL$//;
$file =~ s/\.pl$//
- if ($Config{'osname'} eq 'VMS' or
- $Config{'osname'} eq 'OS2'); # "case-forgiving"
+ if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";
@@ -395,17 +394,20 @@ if ($name ne 'something') {
FCHECK: {
open(F, "< $ARGV[0]") || die "can't open $ARGV[0]: $!";
while (<F>) {
+ next unless /^=\b/;
if (/^=head1\s+NAME\s*$/) { # an /m would forgive mistakes
$_ = <F>;
unless (/\s*-+\s+/) {
$oops++;
- warn "$0: Improper man page - no dash in NAME header in paragraph $. of $ARGV[0]:\n"
+ warn "$0: Improper man page - no dash in NAME header in paragraph $. of $ARGV[0]\n"
}
%namedesc = split /\s+-\s+/;
last FCHECK;
}
+ next if /^=cut\b/; # DB_File and Net::Ping have =cut before NAME
+ die "$0: Invalid man page - 1st pod line is not NAME in $ARGV[0]\n";
}
- die "$0: Invalid man page - no NAME line in $ARGV[0]\n";
+ die "$0: Invalid man page - no documentation in $ARGV[0]\n";
}
close F;
}
@@ -793,7 +795,7 @@ while (<>) {
}
elsif ($Cmd eq 'back') {
$indent = pop(@indent);
- warn "Unmatched =back\n" unless defined $indent;
+ warn "$0: Unmatched =back in paragraph $. of $ARGV\n" unless defined $indent;
$needspace = 1;
}
elsif ($Cmd eq 'item') {
@@ -805,7 +807,7 @@ while (<>) {
# this is just a comment
}
else {
- warn "Unrecognized pod directive: $Cmd\n";
+ warn "$0: Unrecognized pod directive in paragraph $. of $ARGV: $Cmd\n";
}
}
else {
@@ -951,7 +953,7 @@ sub noremap {
sub init_noremap {
if ( /[\200-\377]/ ) {
- warn "high bit char in input stream";
+ warn "$0: high bit char in input stream in paragraph $. of $ARGV\n";
}
}
@@ -975,7 +977,7 @@ sub clear_noremap {
exists $HTML_Escapes{$1}
? do { $HTML_Escapes{$1} }
: do {
- warn "Unknown escape: $& in $_";
+ warn "$0: Unknown escape in paragraph $. of $ARGV: ``$&''\n";
"E<$1>";
}
}
diff --git a/pod/pod2text.PL b/pod/pod2text.PL
index 1402f0dbe9..49198078c0 100644
--- a/pod/pod2text.PL
+++ b/pod/pod2text.PL
@@ -15,8 +15,7 @@ use File::Basename qw(&basename &dirname);
chdir(dirname($0));
($file = basename($0)) =~ s/\.PL$//;
$file =~ s/\.pl$//
- if ($Config{'osname'} eq 'VMS' or
- $Config{'osname'} eq 'OS2'); # "case-forgiving"
+ if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";
diff --git a/t/lib/safe.t b/t/lib/safe.t
index dfd6032cc7..e59c81406b 100755
--- a/t/lib/safe.t
+++ b/t/lib/safe.t
@@ -4,7 +4,7 @@ BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
require Config; import Config;
- if ($Config{'extensions'} !~ /\bSafe\b/ && $Config{'osname'} ne 'VMS') {
+ if ($Config{'extensions'} !~ /\bSafe\b/ && $^O ne 'VMS') {
print "1..0\n";
exit 0;
}
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index 3b882fee0b..370aa87213 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -16,8 +16,7 @@ use File::Basename qw(&basename &dirname);
chdir(dirname($0));
($file = basename($0)) =~ s/\.PL$//;
$file =~ s/\.pl$//
- if ($Config{'osname'} eq 'VMS' or
- $Config{'osname'} eq 'OS2'); # "case-forgiving"
+ if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";
diff --git a/utils/pl2pm.PL b/utils/pl2pm.PL
index 4e69036499..e8277bb673 100644
--- a/utils/pl2pm.PL
+++ b/utils/pl2pm.PL
@@ -15,8 +15,7 @@ use File::Basename qw(&basename &dirname);
chdir(dirname($0));
($file = basename($0)) =~ s/\.PL$//;
$file =~ s/\.pl$//
- if ($Config{'osname'} eq 'VMS' or
- $Config{'osname'} eq 'OS2'); # "case-forgiving"
+ if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";
diff --git a/x2p/find2perl.PL b/x2p/find2perl.PL
index fd8b134fbc..32f78fe23f 100644
--- a/x2p/find2perl.PL
+++ b/x2p/find2perl.PL
@@ -15,8 +15,7 @@ use File::Basename qw(&basename &dirname);
chdir(dirname($0));
($file = basename($0)) =~ s/\.PL$//;
$file =~ s/\.pl$//
- if ($Config{'osname'} eq 'VMS' or
- $Config{'osname'} eq 'OS2'); # "case-forgiving"
+ if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";
diff --git a/x2p/s2p.PL b/x2p/s2p.PL
index 4f7293d4c2..29864b418a 100644
--- a/x2p/s2p.PL
+++ b/x2p/s2p.PL
@@ -15,8 +15,7 @@ use File::Basename qw(&basename &dirname);
chdir(dirname($0));
($file = basename($0)) =~ s/\.PL$//;
$file =~ s/\.pl$//
- if ($Config{'osname'} eq 'VMS' or
- $Config{'osname'} eq 'OS2'); # "case-forgiving"
+ if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";