$mask |= $DeadBits{$word} if $fatal ;
}
else
- { croak("unknown warnings category '$word'")}
+ { croak("Unknown warnings category '$word'")}
}
return $mask ;
$category = shift ;
if (ref $category) {
croak ("not an object")
- if $category !~ /^([^=]+)=/ ;+
+ if $category !~ /^([^=]+)=/ ;
$category = $1 ;
$isobj = 1 ;
}
$offset = $Offsets{$category};
- croak("unknown warnings category '$category'")
+ croak("Unknown warnings category '$category'")
unless defined $offset;
}
else {
data Perl expected. Someone's very confused, or perhaps trying to
subvert Perl's population of %ENV for nefarious purposes.
+=item Unknown warnings category '%s'
+
+(F) An error issued by the C<warnings> pragma. You specified a warnings
+category that is unknown to perl at this point.
+
+Note that if you want to enable a warnings category registered by a module
+(e.g. C<use warnings 'File::Find'>), you must have imported this module
+first.
+
=item unmatched [ in regex; marked by <-- HERE in m/%s/
(F) The brackets around a character class must match. If you wish to
# check illegal category is caught
use warnings 'this-should-never-be-a-warning-category' ;
EXPECT
-unknown warnings category 'this-should-never-be-a-warning-category' at - line 3
+Unknown warnings category 'this-should-never-be-a-warning-category' at - line 3
BEGIN failed--compilation aborted at - line 3.
########
print $@ ;
EXPECT
Usage: warnings::warn([category,] 'message') at - line 4
-unknown warnings category 'fred' at - line 6
+Unknown warnings category 'fred' at - line 6
########
# check warnings::warnif
print $@ ;
EXPECT
Usage: warnings::warnif([category,] 'message') at - line 4
-unknown warnings category 'fred' at - line 6
+Unknown warnings category 'fred' at - line 6
########
--FILE-- abc.pm
$mask |= $DeadBits{$word} if $fatal ;
}
else
- { croak("unknown warnings category '$word'")}
+ { croak("Unknown warnings category '$word'")}
}
return $mask ;
$category = shift ;
if (ref $category) {
croak ("not an object")
- if $category !~ /^([^=]+)=/ ;+
+ if $category !~ /^([^=]+)=/ ;
$category = $1 ;
$isobj = 1 ;
}
$offset = $Offsets{$category};
- croak("unknown warnings category '$category'")
+ croak("Unknown warnings category '$category'")
unless defined $offset;
}
else {