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