Tangeri...HookData(3)

πŸ“¦
version 0.23 Β· 2 versions
, in fedora 43

πŸ’– Tangerine::HookData(3) πŸ’–

okay so bestie, welcome to the Perl manual page for Tangerine::HookData β€” it's giving an envelope for data returned from a hook ✨ and honestly? it's iconic.


✨ NAME ✨

Tangerine::HookData β€” an envelope for data returned from a hook πŸŽ€


🌸 SYNOPSIS 🌸

my $data = Tangerine::HookData->new(
    modules => {
        'ExtUtils::MakeMaker' => [
            Tangerine::Occurence->new(
                line => 3,
                version => '6.30',
            ),
        ],
    },
    hooks => [
        Tangerine::Hook->new(
            type => 'compile',
            run => \&Tangerine::hook::myhook::run,
        ),
    ],
    children => [ qw/myhook_statement with_args ;/ ]
);

like, that's the whole vibe right there πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

Hooks use this class to encapsulate their results before returning them to the main Tangerine object. no cap, that's literally its whole job.

A hook may return:

  • a hash reference of module names pointing to lists of Tangerine::Occurence objects,
  • a list reference of Tangerine::Hook objects that should be added to the list of hooks to run,
  • and a statement which should be parsed in the context of the current line.

periodt. πŸ’–


πŸ‘‘ METHODS πŸ‘‘

🌈 children

Returns or sets the statement to be analysed. This is a simple list reference of significant children. Tangerine statements are created from PPI::Statement's schildren method. so it's lowkey the PPI glue, iykyk 🧚

πŸ¦‹ hooks

Returns or sets a list reference of Tangerine::Hook hooks to be run. slay.

πŸ“ modules

Returns or sets a hash reference of module names pointing to list references of Tangerine::Occurence objects. that's the receipts right there πŸ’…

⭐ type

Forces the data type, overriding the hook's type value. The possible values being package, compile, or runtime. those are the only three, bestie, don't try to be cute with it πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯

  • Tangerine
  • Tangerine::Hook
  • Tangerine::Occurence
  • PPI::Statement

go read those next, they're all part of the same friend group 🫢


🌸 AUTHOR 🌸

Petr Ε abata <contyk@redhat.com> β€” we love a legend πŸ’œ


Copyright (c) 2014-2016 Petr Ε abata

See LICENSE for licensing details.


and that's the whole page, bestie!! this lil cutie came from perl v5.42.0, dated 2025-07-25 β€” so it's ✨ fresh ✨ and you can find it chilling in the Perl manual section 3 πŸ’–πŸ’…πŸ¦‹

πŸ“¦ where this page comes from