blib/lib/CPAN/FindDependencies/Dependency.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 100% 5 / 5 totaltotal 100% 33 / 33 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/script/cpandeps ↑ Summary
1 package CPAN::FindDependencies::Dependency;
2  
3 34 require CPAN::FindDependencies;
4  
5 34 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 34 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 34 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 34 $VERSION = '3.04';
11  
12 =head1 NAME
13  
14 CPAN::FindDependencies::Dependency - object representing a module dependency
15  
16 =head1 SYNOPSIS
17  
18 my @dependencies = CPAN::FindDependencies::finddeps("CPAN");
19 foreach my $dep (@dependencies) {
20 print ' ' x $dep->depth();
21 print $dep->name().' (dist: '.$dep->distribution().', mod ver: '.$dep->version().")\n";
22 }
23  
24 =head1 METHODS
25  
26 The following read-only accessors are available. You will note that
27 there is no public constructor and no mutators. Objects will be
28 created by the CPAN::FindDependencies module.
29  
30 =cut
31  
32 198 ▶sub _new {
Subroutine _new: called CC=1 SCAR=0.0
33 198 my($class, %opts) = @_;
34 198 bless \%opts, $class;
35 }
36  
37 =head2 name
38  
39 The name of the module
40  
41 =cut
42  
43 200 ▶sub name { $_[0]->{cpanmodule} }
Subroutine name: called CC=1 SCAR=0.0
Pod documented
44  
45 =head2 distribution
46  
47 The name of the distribution containing the module
48  
49 =cut
50  
51 180 ▶sub distribution {
Subroutine distribution: called CC=1 SCAR=0.0
Pod documented
52 180 $_[0]->{distribution}->prefix();
53 }
54  
55 =head2 version
56  
57 The minimum required version (if specified) of the module
58  
59 =cut
60  
61 12 ▶sub version {
Subroutine version: called CC=1 SCAR=0.0
Pod documented
62 $_[0]->{version}
63 12 }
64  
65 =head2 depth
66  
67 How deeply nested this module is in the dependency tree
68  
69 =cut
70  
71 69 ▶sub depth { return $_[0]->{depth} }
Subroutine depth: called CC=1 SCAR=0.0
Pod documented
72  
73 =head2 warning
74  
75 If any warnings were generated while processing the module (even
76 if suppressed), this will return them.
77  
78 =cut
79  
80 69 ▶sub warning { return $_[0]->{warning} }
Subroutine warning: called CC=1 SCAR=0.0
Pod documented
81  
82 =head1 BUGS/LIMITATIONS
83  
84 None known
85  
86 =head1 FEEDBACK
87  
88 I welcome feedback about my code, including constructive criticism
89 and bug reports. The best bug reports include files that I can add
90 to the test suite, which fail with the current code in my git repo and
91 will pass once I've fixed the bug
92  
93 =head1 SOURCE CODE REPOSITORY
94  
95 L<git://github.com/DrHyde/perl-modules-CPAN-FindDependencies.git>
96  
97 =head1 SEE ALSO
98  
99 L<CPAN::FindDepdendencies>
100  
101 L<CPAN>
102  
103 L<http://deps.cpantesters.org/>
104  
105 =head1 AUTHOR, LICENCE and COPYRIGHT
106  
107 Copyright 2007 - 2026 David Cantrell E<lt>F<david@cantrell.org.uk>E<gt>
108  
109 This software is free-as-in-speech software, and may be used,
110 distributed, and modified under the terms of either the GNU
111 General Public Licence version 2 or the Artistic Licence. It's
112 up to you which one you use. The full text of the licences can
113 be found in the files GPL2.txt and ARTISTIC.txt, respectively.
114  
115 =head1 CONSPIRACY
116  
117 This module is also free-as-in-mason software.
118  
119 =cut
120  
121 34 1;
« blib/script/cpandeps ↑ Summary