| 1 | package warnings::register; | ||
| 2 | |||
| 3 | our $VERSION = '1.04'; | ||
| 4 | require warnings; | ||
| 5 | |||
| 6 | # left here as cruft in case other users were using this undocumented routine | ||
| 7 | # -- rjbs, 2010-09-08 | ||
| 8 | sub mkMask | ||
| 9 | { | ||
| 10 | my ($bit) = @_; | ||
| 11 | my $mask = ""; | ||
| 12 | |||
| 13 | vec($mask, $bit, 1) = 1; | ||
| 14 | return $mask; | ||
| 15 | } | ||
| 16 | |||
| 17 | sub import | ||
| 18 | { | ||
| 19 | shift; | ||
| 20 | my @categories = @_; | ||
| 21 | |||
| 22 | my $package = (caller(0))[0]; | ||
| 23 | warnings::register_categories($package); | ||
| 24 | |||
| 25 | warnings::register_categories($package . "::$_") for @categories; | ||
| 26 | } | ||
| 27 | 1; | ||
| 28 | __END__ |