1 package warnings::register ;
9 warnings::register - warnings import function
13 use warnings::register ;
17 Create a warnings category with the same name as the current package.
19 See L<perlmodlib/Pragmatic Modules> and L<perllexwarn>.
31 vec($mask, $bit, 1) = 1 ;
38 my $package = (caller(0))[0] ;
39 if (! defined $warnings::Bits{$package}) {
40 $warnings::Bits{$package} = mkMask($warnings::LAST_BIT) ;
41 vec($warnings::Bits{'all'}, $warnings::LAST_BIT, 1) = 1 ;
42 $warnings::Offsets{$package} = $warnings::LAST_BIT ++ ;
43 foreach my $k (keys %warnings::Bits) {
44 vec($warnings::Bits{$k}, $warnings::LAST_BIT, 1) = 0 ;
46 $warnings::DeadBits{$package} = mkMask($warnings::LAST_BIT);
47 vec($warnings::DeadBits{'all'}, $warnings::LAST_BIT++, 1) = 1 ;