1PPI::Statement::SchedulUesde(r3)Contributed Perl DocumenPtPaIt:i:oSntatement::Scheduled(3)
2
3
4

NAME

6       PPI::Statement::Scheduled - A scheduled code block
7

INHERITANCE

9         PPI::Statement::Scheduled
10         isa PPI::Statement::Sub
11             isa PPI::Statement
12                 isa PPI::Node
13                     isa PPI::Element
14

DESCRIPTION

16       A scheduled code block is one that is intended to be run at a specific
17       time during the loading process.
18
19       There are four types of scheduled block:
20
21         BEGIN {
22               # Executes as soon as this block is fully defined
23               ...
24         }
25
26         CHECK {
27               # Executes after compile-phase in reverse order
28               ...
29         }
30
31         INIT {
32               # Executes just before run-time
33               ...
34         }
35
36         END {
37               # Executes as late as possible in reverse order
38               ...
39         }
40
41       Technically these scheduled blocks are actually subroutines, and in
42       fact may have 'sub' in front of them.
43

METHODS

45       type
46
47       The "type" method returns the type of scheduled block, which should
48       always be one of 'BEGIN', 'CHECK', 'INIT' or 'END'.
49

TO DO

51       - Write unit tests for this package
52

SUPPORT

54       See the support section in the main module.
55

AUTHOR

57       Adam Kennedy <adamk@cpan.org>
58
60       Copyright 2001 - 2006 Adam Kennedy.
61
62       This program is free software; you can redistribute it and/or modify it
63       under the same terms as Perl itself.
64
65       The full text of the license can be found in the LICENSE file included
66       with this module.
67
68
69
70perl v5.8.8                       2006-09-23      PPI::Statement::Scheduled(3)
Impressum