The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Tangerine::Hook - A simple hook object.

SYNOPSIS

    my $hook = Tangerine::Hook->new(
        type => 'prov',
        run => \&Tangerine::hook::package::run
    );
    $hook->run([ qw/use strict ;/]);

DESCRIPTION

Hooks hold a code reference to the actual hook routine. They also have a type property which may be one of prov, req or use to denote whether this hook is returns provided modules or modules required at run-time or compile-time respectively.

Code references expect a statement to process. This is simply a list reference of PPI::Statement's significant children.

METHODS

type

Returns or sets the hook type. May be one of prov, req or use.

run

Returns or set the hook code reference.

SEE ALSO

Tangerine, PPI::Statement

AUTHOR

Petr Šabata <contyk@redhat.com>

COPYRIGHT AND LICENSE

Copyright (c) 2014 Petr Šabata

See LICENSE for licensing details.