Upgrade to PathTools-3.23.
[p5sagit/p5-mst-13.2.git] / lib / assertions / activate.pm
CommitLineData
06492da6 1package assertions::activate;
2
aefc56c5 3our $VERSION = '0.02';
06492da6 4
06492da6 5sub import {
6 shift;
702815ca 7 @_ = '.*' unless @_;
aefc56c5 8 push @{^ASSERTING}, map { ref $_ eq 'Regexp' ? $_ : qr/^(?:$_)\z/ } @_;
06492da6 9}
10
111;
12__END__
13
14=head1 NAME
15
702815ca 16assertions::activate - activate assertions
06492da6 17
18=head1 SYNOPSIS
19
702815ca 20 use assertions::activate 'Foo', 'bar', 'Foo::boz::.*';
06492da6 21
702815ca 22 # activate all assertions
23 use assertions::activate;
06492da6 24
25=head1 DESCRIPTION
26
702815ca 27This module is used internally by perl (and its C<-A> command-line switch) to
aefc56c5 28enable and disable assertions.
29
e76bdc3c 30Though it can also be explicetly used:
aefc56c5 31
32 use assertions::activate qw(foo bar);
06492da6 33
702815ca 34The import parameters are a list of strings or of regular expressions. The
35assertion tags that match those regexps are enabled. If no parameter is
36given, all assertions are activated.
06492da6 37
38=head1 SEE ALSO
39
702815ca 40L<assertions>, L<perlrun>.
06492da6 41
42=head1 AUTHOR
43
c54bef43 44Salvador FandiE<ntilde>o, E<lt>sfandino@yahoo.comE<gt>
06492da6 45
46=head1 COPYRIGHT AND LICENSE
47
aefc56c5 48Copyright 2002, 2005 by Salvador FandiE<ntilde>o
06492da6 49
50This library is free software; you can redistribute it and/or modify
51it under the same terms as Perl itself.
52
53=cut