{
    "mode": "perldoc",
    "parameter": "POE::Test::Sequence",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/POE%3A%3ATest%3A%3ASequence/json",
    "generated": "2026-10-04T23:46:43Z",
    "synopsis": "Sorry, there isn't a synopsis at this time.\nHowever, see t/90regression/whjackson-followtail.t in POE's test\nsuite for a full example.",
    "sections": {
        "NAME": {
            "content": "POE::Test::Sequence - POE test helper to verify a sequence of events\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "Sorry, there isn't a synopsis at this time.\n\nHowever, see t/90regression/whjackson-followtail.t in POE's test\nsuite for a full example.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "POE::Test::Sequence is a test helper that abstracts a lot of the tedious trickery needed to\nverify the relative ordering of events.\n\nWith this module, one can test the sequence of events without necessarily relying on specific\ntimes elapsing between them.\n\ncreategenericsession\nThe creategenericsession() method creates a POE::Session that routes all vents through the\nPOE::Test::Sequence object. It returns the POE::Session object, but the test program does not\nneed to store it anywhere. In fact, it's recommended not to do that without understanding the\nimplications.\n\nThe implications can be found in the documentation for POE::Kernel and POE::Session.\n\nAn example of creategenericsession() can be found in POE's\nt/90regression/leolo-alarm-adjust.t test program.\n\nnew\nCreate a new sequence object. Takes named parameter pairs, currently just \"sequence\", which\nreferences an array of steps. Each step is an array reference containing the expected event, a\nrequired parameter to that event, and a code reference for the optional next step to take after\ntesting for that event.\n\nmy $sequence = POE::Test::Sequence->new(\nsequence => [\n[ gotidleevent => 0, sub { appendtolog(\"text\") } ],\n...,\n]\n);\n",
            "subsections": [
                {
                    "name": "next",
                    "content": "they should. The third element is returned by next() and is suitable for use as a goto() target.\nSee the next() method for more details.\n\nnext\nThe next() method requires an event name and a scalar parameter. These are compared to the first\ntwo elements of the next sequence step to make sure events are happening in the order in which\nthey should.\n\nsub handlestartevent {\ngoto $sequence->next(\"gotstartevent\", 0);\n}\n\ntestcount"
                },
                {
                    "name": "test_count",
                    "content": "for test planning.\n\nuse Test::More;\nmy $sequence = POE::Test::Sequence->new( ... );\nplan tests => $sequence->testcount();\n"
                }
            ]
        },
        "BUGS": {
            "content": "",
            "subsections": [
                {
                    "name": "create_generic_session",
                    "content": ""
                },
                {
                    "name": "next",
                    "content": "AUTHORS & LICENSING\nPlease see POE for more information about authors, contributors, and POE's licensing.\n"
                }
            ]
        }
    },
    "summary": "POE::Test::Sequence - POE test helper to verify a sequence of events",
    "flags": [],
    "examples": [],
    "see_also": []
}