Debian Codegraph @

README

raw
1 NAME
2 Test::Regexp::Pattern - Test Regexp::Pattern patterns
3
4 VERSION
5 This document describes version 0.010 of Test::Regexp::Pattern (from
6 Perl distribution Test-Regexp-Pattern), released on 2022-07-24.
7
8 SYNOPSIS
9 To check all regexp patterns in a module:
10
11 use Test::Regexp::Pattern;
12 regexp_patterns_in_module_ok("Foo::Bar", {opt => ...}, $msg);
13
14 Alternatively, you can check all regexp patterns in all modules in a
15 distro:
16
17 # save in release-regexp-pattern.t, put in distro's t/ subdirectory
18 use Test::More;
19 plan skip_all => "Not release testing" unless $ENV{RELEASE_TESTING};
20 eval "use Test::Regexp::Pattern";
21 plan skip_all => "Test::Regexp::Pattern required for testing Regexp::Pattern patterns" if $@;
22 regexp_patterns_in_all_modules_ok({opt => ...}, $msg);
23
24 DESCRIPTION
25 This module performs various checks on a module's Regexp::Pattern
26 patterns. It is recommended that you include something like the above
27 "release-regexp-pattern.t" in your distribution if you add regexp
28 patterns to your code. If you use Dist::Zilla to build your
29 distribution, there is a [Regexp::Pattern] plugin which automatically
30 adds this release test file during build.
31
32 ACKNOWLEDGEMENTS
33 Some code taken from Test::Pod::Coverage by Andy Lester.
34
35 FUNCTIONS
36 All these functions are exported by default.
37
38 regexp_patterns_in_module_ok($module [, \%opts ] [, $msg])
39 Load $module and perform test for regexp patterns (%RE) in the module.
40
41 Available options:
42
43 * test_examples => bool (default: 1)
44
45 regexp_patterns_in_all_modules_ok([ \%opts ] [, $msg])
46 Look for modules in directory "lib" (or "blib" instead, if it exists),
47 and run "regexp_patterns_in_module_ok()" against each of them.
48
49 Options are the same as in "regexp_patterns_in_module_ok()".
50
51 HOMEPAGE
52 Please visit the project's homepage at
53 <https://metacpan.org/release/Test-Regexp-Pattern>.
54
55 SOURCE
56 Source repository is at
57 <https://github.com/perlancar/perl-Test-Regexp-Pattern>.
58
59 SEE ALSO
60 test-regexp-pattern, a command-line interface for
61 "regexp_patterns_in_all_modules_ok()".
62
63 Regexp::Pattern
64
65 Dist::Zilla::Plugin::Regexp::Pattern
66
67 AUTHOR
68 perlancar <[email protected]>
69
70 CONTRIBUTING
71 To contribute, you can send patches by email/via RT, or send pull
72 requests on GitHub.
73
74 Most of the time, you don't need to build the distribution yourself. You
75 can simply modify the code, then test via:
76
77 % prove -l
78
79 If you want to build the distribution (e.g. to try to install it locally
80 on your system), you can install Dist::Zilla,
81 Dist::Zilla::PluginBundle::Author::PERLANCAR, and sometimes one or two
82 other Dist::Zilla plugin and/or Pod::Weaver::Plugin. Any additional
83 steps required beyond that are considered a bug and can be reported to
84 me.
85
86 COPYRIGHT AND LICENSE
87 This software is copyright (c) 2022, 2020, 2018 by perlancar
88 <[email protected]>.
89
90 This is free software; you can redistribute it and/or modify it under
91 the same terms as the Perl 5 programming language system itself.
92
93 BUGS
94 Please report any bugs or feature requests on the bugtracker website
95 <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Regexp-Pattern>
96
97 When submitting a bug or request, please include a test-file or a patch
98 to an existing test-file that illustrates the bug or desired feature.
99