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