summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2000-12-07 21:45:08 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2000-12-07 21:45:08 +0000
commit0ca4541c317eb395329cac582e39db540241d553 (patch)
tree076350ff7eabc839d57a05b1665f3fb0885568d6
parent766a733e849204725c27391cf2992d649af4aba6 (diff)
downloadperl-0ca4541c317eb395329cac582e39db540241d553.tar.gz
Various oddities p4 diff -se showed up
Remove 'our' from warnings.pl p4raw-id: //depot/perlio@8026
-rw-r--r--global.sym2
-rw-r--r--lib/warnings.pm20
-rw-r--r--pod/perlapi.pod4
-rw-r--r--warnings.pl39
4 files changed, 35 insertions, 30 deletions
diff --git a/global.sym b/global.sym
index b5c367d651..7ca196bc1e 100644
--- a/global.sym
+++ b/global.sym
@@ -444,6 +444,7 @@ Perl_sv_taint
Perl_sv_tainted
Perl_sv_unmagic
Perl_sv_unref
+Perl_sv_unref_flags
Perl_sv_untaint
Perl_sv_upgrade
Perl_sv_usepvn
@@ -529,6 +530,7 @@ Perl_sv_utf8_downgrade
Perl_sv_utf8_encode
Perl_sv_utf8_decode
Perl_sv_force_normal
+Perl_sv_force_normal_flags
Perl_tmps_grow
Perl_sv_rvweaken
Perl_newANONATTRSUB
diff --git a/lib/warnings.pm b/lib/warnings.pm
index 2517239365..e3416419fd 100644
--- a/lib/warnings.pm
+++ b/lib/warnings.pm
@@ -5,6 +5,8 @@
package warnings;
+our $VERSION = '1.00';
+
=head1 NAME
warnings - Perl pragma to control optional warnings
@@ -39,7 +41,7 @@ warnings - Perl pragma to control optional warnings
If no import list is supplied, all possible warnings are either enabled
or disabled.
-A number of functions are provided to assist module authors.
+A number of functions are provided to assist module authors.
=over 4
@@ -295,7 +297,7 @@ sub bits {
$mask |= $DeadBits{$word} if $fatal ;
}
else
- { croak("unknown warnings category '$word'")}
+ { croak("unknown warnings category '$word'")}
}
return $mask ;
@@ -341,13 +343,13 @@ sub __chk
unless defined $offset;
}
else {
- $category = (caller(1))[0] ;
+ $category = (caller(1))[0] ;
$offset = $Offsets{$category};
croak("package '$category' not registered for warnings")
unless defined $offset ;
}
- my $this_pkg = (caller(1))[0] ;
+ my $this_pkg = (caller(1))[0] ;
my $i = 2 ;
my $pkg ;
@@ -361,11 +363,11 @@ sub __chk
for ($i = 2 ; $pkg = (caller($i))[0] ; ++ $i) {
last if $pkg ne $this_pkg ;
}
- $i = 2
+ $i = 2
if !$pkg || $pkg eq $this_pkg ;
}
- my $callers_bitmask = (caller($i))[9] ;
+ my $callers_bitmask = (caller($i))[9] ;
return ($callers_bitmask, $offset, $i) ;
}
@@ -390,7 +392,7 @@ sub warn
my $message = pop ;
my ($callers_bitmask, $offset, $i) = __chk(@_) ;
local $Carp::CarpLevel = $i ;
- croak($message)
+ croak($message)
if vec($callers_bitmask, $offset+1, 1) ||
vec($callers_bitmask, $Offsets{'all'}+1, 1) ;
carp($message) ;
@@ -405,12 +407,12 @@ sub warnif
my ($callers_bitmask, $offset, $i) = __chk(@_) ;
local $Carp::CarpLevel = $i ;
- return
+ return
unless defined $callers_bitmask &&
(vec($callers_bitmask, $offset, 1) ||
vec($callers_bitmask, $Offsets{'all'}, 1)) ;
- croak($message)
+ croak($message)
if vec($callers_bitmask, $offset+1, 1) ||
vec($callers_bitmask, $Offsets{'all'}+1, 1) ;
diff --git a/pod/perlapi.pod b/pod/perlapi.pod
index f5b237f6db..1f270ce30e 100644
--- a/pod/perlapi.pod
+++ b/pod/perlapi.pod
@@ -3063,8 +3063,8 @@ Found in file sv.c
Unsets the RV status of the SV, and decrements the reference count of
whatever was being referenced by the RV. This can almost be thought of
-as a reversal of C<newSVrv>. This is C<sv_unref_flags> with C<flag>
-of zero. See C<SvROK_off>.
+as a reversal of C<newSVrv>. This is C<sv_unref_flags> with the C<flag>
+being zero. See C<SvROK_off>.
void sv_unref(SV* sv)
diff --git a/warnings.pl b/warnings.pl
index be520ee146..3a5037d40d 100644
--- a/warnings.pl
+++ b/warnings.pl
@@ -1,6 +1,7 @@
#!/usr/bin/perl
-our $VERSION = '1.00';
+
+$VERSION = '1.00';
BEGIN {
push @INC, './lib';
@@ -106,7 +107,7 @@ sub mkRange
for ($i = 1 ; $i < @a; ++ $i) {
- $out[$i] = ".."
+ $out[$i] = ".."
if $a[$i] == $a[$i - 1] + 1 && $a[$i] + 1 == $a[$i + 1] ;
}
@@ -132,9 +133,9 @@ sub printTree
print $prefix . "|\n" ;
print $prefix . "+- $k" ;
if (ref $v)
- {
+ {
print " " . "-" x ($max - length $k ) . "+\n" ;
- printTree ($v, $prefix . "|" , $max + $indent - 1)
+ printTree ($v, $prefix . "|" , $max + $indent - 1)
}
else
{ print "\n" }
@@ -291,9 +292,9 @@ foreach $k (sort keys %list) {
my $v = $list{$k} ;
my @list = sort { $a <=> $b } @$v ;
- print PM tab(4, " '$k'"), '=> "',
- # mkHex($warn_size, @list),
- mkHex($warn_size, map $_ * 2 , @list),
+ print PM tab(4, " '$k'"), '=> "',
+ # mkHex($warn_size, @list),
+ mkHex($warn_size, map $_ * 2 , @list),
'", # [', mkRange(@list), "]\n" ;
}
@@ -305,9 +306,9 @@ foreach $k (sort keys %list) {
my $v = $list{$k} ;
my @list = sort { $a <=> $b } @$v ;
- print PM tab(4, " '$k'"), '=> "',
- # mkHex($warn_size, @list),
- mkHex($warn_size, map $_ * 2 + 1 , @list),
+ print PM tab(4, " '$k'"), '=> "',
+ # mkHex($warn_size, @list),
+ mkHex($warn_size, map $_ * 2 + 1 , @list),
'", # [', mkRange(@list), "]\n" ;
}
@@ -365,7 +366,7 @@ warnings - Perl pragma to control optional warnings
If no import list is supplied, all possible warnings are either enabled
or disabled.
-A number of functions are provided to assist module authors.
+A number of functions are provided to assist module authors.
=over 4
@@ -469,7 +470,7 @@ sub bits {
$mask |= $DeadBits{$word} if $fatal ;
}
else
- { croak("unknown warnings category '$word'")}
+ { croak("unknown warnings category '$word'")}
}
return $mask ;
@@ -515,13 +516,13 @@ sub __chk
unless defined $offset;
}
else {
- $category = (caller(1))[0] ;
+ $category = (caller(1))[0] ;
$offset = $Offsets{$category};
croak("package '$category' not registered for warnings")
unless defined $offset ;
}
- my $this_pkg = (caller(1))[0] ;
+ my $this_pkg = (caller(1))[0] ;
my $i = 2 ;
my $pkg ;
@@ -535,11 +536,11 @@ sub __chk
for ($i = 2 ; $pkg = (caller($i))[0] ; ++ $i) {
last if $pkg ne $this_pkg ;
}
- $i = 2
+ $i = 2
if !$pkg || $pkg eq $this_pkg ;
}
- my $callers_bitmask = (caller($i))[9] ;
+ my $callers_bitmask = (caller($i))[9] ;
return ($callers_bitmask, $offset, $i) ;
}
@@ -564,7 +565,7 @@ sub warn
my $message = pop ;
my ($callers_bitmask, $offset, $i) = __chk(@_) ;
local $Carp::CarpLevel = $i ;
- croak($message)
+ croak($message)
if vec($callers_bitmask, $offset+1, 1) ||
vec($callers_bitmask, $Offsets{'all'}+1, 1) ;
carp($message) ;
@@ -579,12 +580,12 @@ sub warnif
my ($callers_bitmask, $offset, $i) = __chk(@_) ;
local $Carp::CarpLevel = $i ;
- return
+ return
unless defined $callers_bitmask &&
(vec($callers_bitmask, $offset, 1) ||
vec($callers_bitmask, $Offsets{'all'}, 1)) ;
- croak($message)
+ croak($message)
if vec($callers_bitmask, $offset+1, 1) ||
vec($callers_bitmask, $Offsets{'all'}+1, 1) ;