File Coverage

inc/My/Module/Meta.pm
Criterion Covered Total %
statement 18 48 37.5
branch 0 6 0.0
condition 0 3 0.0
subroutine 9 22 40.9
pod 18 18 100.0
total 45 97 46.3


line stmt bran cond sub pod time code
1             package My::Module::Meta;
2              
3 1     1   16 use 5.008;
  1         3  
4              
5 1     1   4 use strict;
  1         1  
  1         20  
6 1     1   2 use warnings;
  1         1  
  1         47  
7              
8 1     1   4 use Carp;
  1         1  
  1         747  
9              
10             sub new {
11 0     0 1 0 my ( $class ) = @_;
12 0 0       0 ref $class and $class = ref $class;
13             my $self = {
14             distribution => $ENV{MAKING_MODULE_DISTRIBUTION},
15 0         0 };
16 0         0 bless $self, $class;
17 0         0 return $self;
18             }
19              
20             sub abstract {
21 0     0 1 0 return 'Predict satellite visibility using Astro::Coord::ECI';
22             }
23              
24             sub add_to_cleanup {
25 0     0 1 0 return [ qw{ cover_db } ];
26             }
27              
28             sub author {
29 0     0 1 0 return 'Tom Wyant (wyant at cpan dot org)';
30             }
31              
32             sub build_requires {
33             return +{
34 1     1 1 5 'Test2::V0' => 0,
35             'Test2::Plugin::BailOnFail' => 0,
36             'Test2::Tools::Explain' => 0,
37             'Test2::Tools::LoadModule' => 0,
38             };
39             }
40              
41             sub configure_requires {
42             return +{
43 1     1 1 3 'lib' => 0,
44             'strict' => 0,
45             'warnings' => 0,
46             };
47             }
48              
49             sub dist_name {
50 0     0 1 0 return 'Astro-App-Satpass2';
51             }
52              
53             sub distribution {
54 0     0 1 0 my ( $self ) = @_;
55 0         0 return $self->{distribution};
56             }
57              
58             sub license {
59 0     0 1 0 return 'perl';
60             }
61              
62             sub meta_merge {
63 0     0 1 0 my ( undef, @extra ) = @_;
64             return {
65 0         0 'meta-spec' => {
66             version => 2,
67             },
68             dynamic_config => 1,
69             resources => {
70             bugtracker => {
71             web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Astro-App-Satpass2',
72             # web => 'https://github.com/trwyant/perl-Astro-App-Satpass2/issues',
73             mailto => 'wyant@cpan.org',
74             },
75             license => 'http://dev.perl.org/licenses/',
76             repository => {
77             type => 'git',
78             url => 'git://github.com/trwyant/perl-Astro-App-Satpass2.git',
79             web => 'https://github.com/trwyant/perl-Astro-App-Satpass2',
80             },
81             },
82             @extra,
83             };
84             }
85              
86             sub module_name {
87 0     0 1 0 return 'Astro::App::Satpass2';
88             }
89              
90             sub no_index {
91             return +{
92 0     0 1 0 directory => [ qw{ eg inc t xt } ],
93             };
94             }
95              
96             sub optional_modules {
97 1     1 1 752 require My::Module::Recommend;
98 1         12 return My::Module::Recommend->optional_modules();
99             }
100              
101             sub provides {
102 0     0 1 0 my $provides;
103 0         0 local $@ = undef;
104              
105 0 0       0 eval {
106 0         0 require CPAN::Meta;
107 0         0 require Module::Metadata;
108              
109 0         0 $provides = Module::Metadata->provides(
110             version => 2,
111             dir => 'lib',
112             );
113              
114             # Skeleton so we can use should_index_file() and
115             # should_index_package().
116 0         0 my $meta = CPAN::Meta->new( {
117             name => 'Euler',
118             version => 2.71828,
119             no_index => no_index(),
120             },
121             );
122              
123             # Remove things that are not to be indexed, if any.
124 0         0 foreach my $module ( keys %{ $provides } ) {
  0         0  
125             $meta->should_index_package( $module )
126             and $meta->should_index_file( $provides->{$module}{file} )
127 0 0 0     0 or delete $provides->{$module};
128             }
129              
130 0         0 1;
131             } or return;
132              
133 0         0 return ( provides => $provides );
134             }
135              
136             sub requires {
137 1     1 1 4 my ( undef, @extra ) = @_; # Invocant unused
138             return {
139 1         32 'Astro::Coord::ECI' => 0.131,
140             'Astro::Coord::ECI::Moon' => 0.131,
141             'Astro::Coord::ECI::Star' => 0.131,
142             'Astro::Coord::ECI::Sun' => 0.131,
143             'Astro::Coord::ECI::TLE' => 0.131,
144             'Astro::Coord::ECI::TLE::Set' => 0.131,
145             'Astro::Coord::ECI::Utils' => 0.131, # for gm_strftime() ...
146             'Attribute::Handlers' => 0,
147             'Carp' => 0,
148             'Clone' => 0,
149             'Cwd' => 0,
150             'Exporter' => 0,
151             'File::Glob' => 0,
152             'File::HomeDir' => 0.93, # For my_dist_config
153             'File::Spec' => 0,
154             'File::Temp' => 0,
155             'Getopt::Long' => 2.39, # For getoptionsfromarray
156             'I18N::LangTags' => 0,
157             'I18N::LangTags::Detect' => 0,
158             'IO::File' => 1.14,
159             'IO::Handle' => 0,
160             'IPC::System::Simple' => 0,
161             'List::Util' => 0,
162             ## 'Params::Util' => 0.250,
163             'POSIX' => 0,
164             'Scalar::Util' => 1.26, # For isdual()
165             ## 'Task::Weaken' => 0,
166             'Template' => 2.21,
167             'Template::Provider' => 2.21,
168             'Text::Abbrev' => 0,
169             'Text::ParseWords' => 0,
170             'Text::Wrap' => 0,
171             'Time::Local' => 0,
172             constant => 0,
173             lib => 0,
174             parent => 0,
175             strict => 0,
176             utf8 => 0,
177             warnings => 0,
178             @extra,
179             };
180             }
181              
182             sub requires_perl {
183 1     1 1 4 return 5.008;
184             }
185              
186             sub script_files {
187             return [
188 0     0 1   'script/satpass2',
189             ];
190             }
191              
192             sub version_from {
193 0     0 1   return 'lib/Astro/App/Satpass2.pm';
194             }
195              
196             1;
197              
198             __END__