This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
speed up building with less disk IO pod moves+__END__+misc
[perl5.git] / lib / warnings / register.pm
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__
29
30 =pod
31
32 =head1 NAME
33
34 warnings::register - warnings import function
35
36 =head1 SYNOPSIS
37
38     use warnings::register;
39
40 =head1 DESCRIPTION
41
42 Creates a warnings category with the same name as the current package.
43
44 See L<warnings> for more information on this module's usage.
45
46 =cut