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.006 of Test::Regexp::Pattern (from
10       Perl distribution Test-Regexp-Pattern), released on 2020-01-04.
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
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 [Regexp::Pattern] which automatically adds a
34       release test file for this 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

BUGS

64       Please report any bugs or feature requests on the bugtracker website
65       <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Regexp-Pattern>
66
67       When submitting a bug or request, please include a test-file or a patch
68       to an existing test-file that illustrates the bug or desired feature.
69

SEE ALSO

71       test-regexp-pattern, a command-line interface for
72       "regexp_patterns_in_all_modules_ok()".
73
74       Regexp::Pattern
75
76       Dist::Zilla::Plugin::Regexp::Pattern
77

AUTHOR

79       perlancar <perlancar@cpan.org>
80
82       This software is copyright (c) 2020, 2018 by perlancar@cpan.org.
83
84       This is free software; you can redistribute it and/or modify it under
85       the same terms as the Perl 5 programming language system itself.
86
87
88
89perl v5.32.1                      2021-01-27          Test::Regexp::Pattern(3)
Impressum