1Test::Regexp::Pattern(3U)ser Contributed Perl DocumentatiToenst::Regexp::Pattern(3)
2
3
4

NAME

6       Test::Regexp::Pattern - Test Regexp::Pattern patterns
7

VERSION

9       This document describes version 0.010 of Test::Regexp::Pattern (from
10       Perl distribution Test-Regexp-Pattern), released on 2022-07-24.
11

SYNOPSIS

13       To check all regexp patterns in a module:
14
15        use Test::Regexp::Pattern;
16        regexp_patterns_in_module_ok("Foo::Bar", {opt => ...}, $msg);
17
18       Alternatively, you can check all regexp patterns in all modules in a
19       distro:
20
21        # save in release-regexp-pattern.t, put in distro's t/ subdirectory
22        use Test::More;
23        plan skip_all => "Not release testing" unless $ENV{RELEASE_TESTING};
24        eval "use Test::Regexp::Pattern";
25        plan skip_all => "Test::Regexp::Pattern required for testing Regexp::Pattern patterns" if $@;
26        regexp_patterns_in_all_modules_ok({opt => ...}, $msg);
27

DESCRIPTION

29       This module performs various checks on a module's Regexp::Pattern
30       patterns.  It is recommended that you include something like the above
31       "release-regexp-pattern.t" in your distribution if you add regexp
32       patterns to your code. If you use Dist::Zilla to build your
33       distribution, there is a [Regexp::Pattern] plugin which automatically
34       adds this release test file during build.
35

ACKNOWLEDGEMENTS

37       Some code taken from Test::Pod::Coverage by Andy Lester.
38

FUNCTIONS

40       All these functions are exported by default.
41
42   regexp_patterns_in_module_ok($module [, \%opts ] [, $msg])
43       Load $module and perform test for regexp patterns (%RE) in the module.
44
45       Available options:
46
47       •   test_examples => bool (default: 1)
48
49   regexp_patterns_in_all_modules_ok([ \%opts ] [, $msg])
50       Look for modules in directory "lib" (or "blib" instead, if it exists),
51       and run regexp_patterns_in_module_ok() against each of them.
52
53       Options are the same as in regexp_patterns_in_module_ok().
54

HOMEPAGE

56       Please visit the project's homepage at
57       <https://metacpan.org/release/Test-Regexp-Pattern>.
58

SOURCE

60       Source repository is at
61       <https://github.com/perlancar/perl-Test-Regexp-Pattern>.
62

SEE ALSO

64       test-regexp-pattern, a command-line interface for
65       regexp_patterns_in_all_modules_ok().
66
67       Regexp::Pattern
68
69       Dist::Zilla::Plugin::Regexp::Pattern
70

AUTHOR

72       perlancar <perlancar@cpan.org>
73

CONTRIBUTING

75       To contribute, you can send patches by email/via RT, or send pull
76       requests on GitHub.
77
78       Most of the time, you don't need to build the distribution yourself.
79       You can simply modify the code, then test via:
80
81        % prove -l
82
83       If you want to build the distribution (e.g. to try to install it
84       locally on your system), you can install Dist::Zilla,
85       Dist::Zilla::PluginBundle::Author::PERLANCAR, and sometimes one or two
86       other Dist::Zilla plugin and/or Pod::Weaver::Plugin. Any additional
87       steps required beyond that are considered a bug and can be reported to
88       me.
89
91       This software is copyright (c) 2022, 2020, 2018 by perlancar
92       <perlancar@cpan.org>.
93
94       This is free software; you can redistribute it and/or modify it under
95       the same terms as the Perl 5 programming language system itself.
96

BUGS

98       Please report any bugs or feature requests on the bugtracker website
99       <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Regexp-Pattern>
100
101       When submitting a bug or request, please include a test-file or a patch
102       to an existing test-file that illustrates the bug or desired feature.
103
104
105
106perl v5.38.0                      2023-07-21          Test::Regexp::Pattern(3)
Impressum