Debian Codegraph @

lib/warnings/register.pm

raw
1 package warnings::register 1.06;
2
3 require warnings;
4
5 # left here as cruft in case other users were using this undocumented routine
6 # -- rjbs, 2010-09-08
7 sub mkMask
8 {
9 my ($bit) = @_;
10 my $mask = "";
11
12 vec($mask, $bit, 1) = 1;
13 return $mask;
14 }
15
16 sub import
17 {
18 shift;
19 my @categories = @_;
20
21 my $package = caller;
22 warnings::register_categories($package);
23
24 warnings::register_categories($package . "::$_") for @categories;
25 }
26 1;
27 __END__
28
29 =pod
30
31 =head1 NAME
32
33 warnings::register - warnings import function
34
35 =head1 SYNOPSIS
36
37 use warnings::register;
38
39 =head1 DESCRIPTION
40
41 Creates a warnings category with the same name as the current package.
42
43 See L<warnings/"Reporting Warnings from a Module"> for more information
44 on this module's usage.
45
46 =cut