Commit | Line | Data |
06492da6 |
1 | package assertions::activate; |
2 | |
3 | our $VERSION = '0.01'; |
4 | |
06492da6 |
5 | sub import { |
6 | shift; |
702815ca |
7 | @_ = '.*' unless @_; |
8 | push @{^ASSERTING}, map { qr/^(?:$_)\z/ } @_; |
06492da6 |
9 | } |
10 | |
11 | 1; |
12 | __END__ |
13 | |
14 | =head1 NAME |
15 | |
702815ca |
16 | assertions::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 |
27 | This module is used internally by perl (and its C<-A> command-line switch) to |
28 | enable and disable assertions. It can also be used directly. |
06492da6 |
29 | |
702815ca |
30 | The import parameters are a list of strings or of regular expressions. The |
31 | assertion tags that match those regexps are enabled. If no parameter is |
32 | given, all assertions are activated. |
06492da6 |
33 | |
34 | =head1 SEE ALSO |
35 | |
702815ca |
36 | L<assertions>, L<perlrun>. |
06492da6 |
37 | |
38 | =head1 AUTHOR |
39 | |
c54bef43 |
40 | Salvador FandiE<ntilde>o, E<lt>sfandino@yahoo.comE<gt> |
06492da6 |
41 | |
42 | =head1 COPYRIGHT AND LICENSE |
43 | |
c54bef43 |
44 | Copyright 2002 by Salvador FandiE<ntilde>o |
06492da6 |
45 | |
46 | This library is free software; you can redistribute it and/or modify |
47 | it under the same terms as Perl itself. |
48 | |
49 | =cut |