Tangerine(3)
β¨ 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 AND LICENSE π
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
- fedora 43: perl-Tangerine 0.23-27.fc43 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms