1Tangerine::HookData(3)User Contributed Perl DocumentationTangerine::HookData(3)
2
3
4

NAME

6       Tangerine::HookData - An envelope for data returned from a hook
7

SYNOPSIS

9           my $data = Tangerine::HookData->new(
10               modules => {
11                   'ExtUtils::MakeMaker' => [
12                       Tangerine::Occurence->new(
13                           line => 3,
14                           version => '6.30',
15                       ),
16                   ],
17               },
18               hooks => [
19                   Tangerine::Hook->new(
20                       type => 'compile',
21                       run => \&Tangerine::hook::myhook::run,
22                   ),
23               ],
24               children => [ qw/myhook_statement with_args ;/ ]
25           );
26

DESCRIPTION

28       Hooks use this class to encapsulate their results before returning them
29       to the main Tangerine object.
30
31       A hook may return a hash reference of module names pointing to lists of
32       Tangerine::Occurence objects, a list reference of Tangerine::Hook
33       objects that should be added to the list of hooks to run and a
34       statement which should be parsed in the context of the current line.
35

METHODS

37       "children"
38           Returns or sets the statement to be analysed.  This is a simple
39           list reference of significant children.  Tangerine statements are
40           created from PPI::Statement's "schildren" method.
41
42       "hooks"
43           Returns or sets a list reference of Tangerine::Hook hooks to be
44           run.
45
46       "modules"
47           Returns or sets a hash reference of module names pointing to list
48           references of Tangerine::Occurence objects.
49
50       "type"
51           Forces the data type, overriding the hook's type value.  The
52           possible values being "package", "compile", or "runtime".
53

SEE ALSO

55       Tangerine, Tangerine::Hook, Tangerine::Occurence, PPI::Statement
56

AUTHOR

58       Petr Šabata <contyk@redhat.com>
59
61       Copyright (c) 2014-2016 Petr Šabata
62
63       See LICENSE for licensing details.
64
65
66
67perl v5.36.0                      2022-07-22            Tangerine::HookData(3)
Impressum