File: README.mkdn

package info (click to toggle)
libpoe-test-loops-perl 1.360-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 448 kB
  • sloc: perl: 6,529; makefile: 2
file content (65 lines) | stat: -rw-r--r-- 2,049 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# NAME

POE::Test::Loops - Reusable tests for POE::Loop authors

# SYNOPSIS

        #!/usr/bin/perl -w

        use strict;
        use Getopt::Long;
        use POE::Test::Loops;

        my ($dir_base, $flag_help, @loop_modules, $flag_verbose);
        my $result = GetOptions(
                'dirbase=s' => \$dir_base,
                'loop=s' => \@loop_modules,
                'verbose' => \$flag_verbose,
                'help' => \$flag_help,
        );

        if (
                !$result or !$dir_base or $flag_help or !@loop_modules
        ) {
                die(
                        "$0 usage:\n",
                        "  --dirbase DIR   (required) base directory for tests\n",
                        "  --loop MODULE   (required) loop modules to test\n",
                        "  --verbose   show some extra output\n",
                        "  --help   you're reading it\n",
                );
        }

        POE::Test::Loops::generate($dir_base, \@loop_modules, $flag_verbose);
        exit 0;

# DESCRIPTION

POE::Test::Loops contains one function, generate(), which will
generate all the loop tests for one or more POE::Loop subclasses.

The ["SYNOPSIS"](#synopsis) example is a version of [poe-gen-tests](https://metacpan.org/pod/poe-gen-tests), which is a
stand-alone utility to generate the actual tests.  [poe-gen-tests](https://metacpan.org/pod/poe-gen-tests)
also documents the POE::Test::Loops system in more detail.

# FUNCTIONS

## generate( $DIRBASE, \\@LOOPS, $VERBOSE )

Generates the loop tests.  DIRBASE is the (relative) directory in
which a subdirectory for each of the LOOPS is created.  If VERBOSE is
set to a TRUE value some progress reporting is printed.

        POE::Test::Loops::generate(
                "./t",
                [ "POE::Loop::Yours" ],
                1,
        );

# SEE ALSO

[POE::Loop](https://metacpan.org/pod/POE::Loop) and [poe-gen-tests](https://metacpan.org/pod/poe-gen-tests).

# AUTHOR & COPYRIGHT

See [poe-gen-tests](https://metacpan.org/pod/poe-gen-tests).