1Tangerine(3)          User Contributed Perl Documentation         Tangerine(3)
2
3
4

NAME

6       Tangerine - Examine perl files and report dependency metadata
7

SYNOPSIS

9           use Tangerine;
10           use version 0.77;
11
12           my $scanner = Tangerine->new(file => $file, mode => 'all');
13           $scanner->run;
14
15           print "$file contains the following modules: ".
16               join q/, /, sort keys %{$scanner->package}."\n";
17
18           print "$file requires Exporter, at runtime, on the following lines: ".
19               join q/, /, sort map $_->line, @{$scanner->runtime->{Exporter}}."\n";
20
21           my $v = 0;
22           for (@{$scanner->compile->{'Test::More'}}) {
23               $v = $_->version if $_->version && qv($v) < qv($_->version)
24           }
25           print "The minimum version of Test::More required by $file is $v.\n";
26

DESCRIPTION

28       Tangerine examines perl files and reports dependency metadata --
29       provided modules, and both compile-time and run-time dependencies,
30       along with line numbers, versions and possibly other related
31       information.
32
33       Currently, PPI is used for the initial parsing and statement
34       extraction.
35

CONSTRUCTOR

37       "new"
38           Creates the Tangerine object.  Takes the following two named
39           arguments:
40
41               'file', the file to examine
42               'mode', determines what to look for; may be one of 'all',
43                   'package', 'compile', or 'runtime'.
44
45           Both arguments are optional, however, 'file' needs to be set before
46           running the scanner, e.g.
47
48               my $scanner = Tangerine->new;
49               $scanner->file($file);
50               $scanner->run;
51

METHODS

53       "run"
54           Runs the analysis.
55
56       "package"
57           Returns a hash reference.  Keys are the modules provided, values
58           references to lists of Tangerine::Occurence objects.
59
60       "compile"
61           Returns a hash reference.  Keys are the modules required at
62           compile-time, values references to lists of Tangerine::Occurence
63           objects.
64
65       "runtime"
66           Returns a hash reference.  Keys are the modules required at run-
67           time, values references to lists of Tangerine::Occurence objects.
68
69       "provides"
70       "requires"
71       "uses"
72           Deprecated.  These are provided for backwards compatibility only.
73

SEE ALSO

75       Tangerine::Occurence
76

REPOSITORY

78       <https://github.com/contyk/tangerine.pm>
79

AUTHOR

81       Petr Šabata <contyk@redhat.com>
82
84       Copyright (c) 2014-2016 Petr Šabata
85
86       See LICENSE for licensing details.
87
88
89
90perl v5.32.0                      2020-07-28                      Tangerine(3)
Impressum