Tangerine(3)

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

✨ Tangerine(3) ✨

okay so bestie, welcome to the Tangerine page β€” it's section 3 of the User Contributed Perl Documentation, and it's literally about snooping through perl files to find out what they depend on. πŸ’…


🌸 NAME 🌸

Tangerine β€” Examine perl files and report dependency metadata. 🍊✨


πŸŽ€ SYNOPSIS πŸŽ€

    use Tangerine;
    use version 0.77;

    my $scanner = Tangerine->new(file => $file, mode => 'all');
    $scanner->run;

    print "$file contains the following modules: ".
        join q/, /, sort keys %{$scanner->package}."\n";

    print "$file requires Exporter, at runtime, on the following lines: ".
        join q/, /, sort map $_->line, @{$scanner->runtime->{Exporter}}."\n";

    my $v = 0;
    for (@{$scanner->compile->{'Test::More'}}) {
        $v = $_->version if $_->version && qv($v) < qv($_->version)
    }
    print "The minimum version of Test::More required by $file is $v.\n";

πŸ’– DESCRIPTION πŸ’–

So Tangerine looks at perl files and reports back all the dependency metadata β€” the modules that get provided, plus compile-time and run-time dependencies, and it hands you line numbers, versions, and possibly other related info too. πŸ¦‹

Currently, <code>PPI</code> is used for the initial parsing and statement extraction. That's the vibe, no cap.


πŸ‘‘ CONSTRUCTOR πŸ‘‘

new

Creates the Tangerine object. ✨ It takes these two named arguments:

  • 'file' β€” the file to examine πŸ“„
  • 'mode' β€” determines what to look for; may be one of 'all', 'package', 'compile', or 'runtime'. πŸ”

Both arguments are optional, however, 'file' needs to be set before running the scanner, e.g.

    my $scanner = Tangerine->new;
    $scanner->file($file);
    $scanner->run;

🌈 METHODS 🌈

run

Runs the analysis. πŸƒβ™€οΈπŸ’¨

package

Returns a hash reference. The keys are the modules provided, and the values are references to lists of Tangerine::Occurence objects. πŸ“¦

compile

Returns a hash reference. The keys are the modules required at compile-time, and the values are references to lists of Tangerine::Occurence objects. βš™οΈ

runtime

Returns a hash reference. The keys are the modules required at run-time, and the values are references to lists of Tangerine::Occurence objects. πŸ•

provides, requires, uses

Deprecated. These are provided for backwards compatibility only. πŸ‘΅πŸ’€ Like, they still work, but don't be that girl.

πŸ¦‹ SEE ALSO πŸ¦‹

  • Tangerine::Occurence πŸ’œ

πŸ”— REPOSITORY πŸ”—

<https://github.com/contyk/tangerine.pm> β€” go star it bestie, it's iconic. ⭐


✍️ AUTHOR ✍️

Petr Šabata <contyk@redhat.com> 🫢


Copyright (c) 2014-2016 Petr Ε abata

See LICENSE for licensing details. πŸŽ€


and that's a wrap, bestie!! this was <code>perl v5.42.0</code> kicking it on <code>2025-07-25</code> β€” mwah πŸ’…βœ¨

πŸ“¦ where this page comes from