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   15 use 5.008;
  1         2  
4              
5 1     1   4 use strict;
  1         1  
  1         21  
6 1     1   3 use warnings;
  1         1  
  1         47  
7              
8 1     1   4 use Carp;
  1         0  
  1         621  
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 (harryfmudd at comcast dot net)';
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://github.com/trwyant/perl-Astro-App-Satpass2/issues',
72             mailto => 'harryfmudd@comcast.net',
73             },
74             license => 'http://dev.perl.org/licenses/',
75             repository => {
76             type => 'git',
77             url => 'git://github.com/trwyant/perl-Astro-App-Satpass2.git',
78             web => 'https://github.com/trwyant/perl-Astro-App-Satpass2',
79             },
80             },
81             @extra,
82             };
83             }
84              
85             sub module_name {
86 0     0 1 0 return 'Astro::App::Satpass2';
87             }
88              
89             sub no_index {
90             return +{
91 0     0 1 0 directory => [ qw{ eg inc t xt } ],
92             };
93             }
94              
95             sub optional_modules {
96 1     1 1 784 require My::Module::Recommend;
97 1         7 return My::Module::Recommend->optional_modules();
98             }
99              
100             sub provides {
101 0     0 1 0 my $provides;
102 0         0 local $@ = undef;
103              
104 0 0       0 eval {
105 0         0 require CPAN::Meta;
106 0         0 require Module::Metadata;
107              
108 0         0 $provides = Module::Metadata->provides(
109             version => 2,
110             dir => 'lib',
111             );
112              
113             # Skeleton so we can use should_index_file() and
114             # should_index_package().
115 0         0 my $meta = CPAN::Meta->new( {
116             name => 'Euler',
117             version => 2.71828,
118             no_index => no_index(),
119             },
120             );
121              
122             # Remove things that are not to be indexed, if any.
123 0         0 foreach my $module ( keys %{ $provides } ) {
  0         0  
124             $meta->should_index_package( $module )
125             and $meta->should_index_file( $provides->{$module}{file} )
126 0 0 0     0 or delete $provides->{$module};
127             }
128              
129 0         0 1;
130             } or return;
131              
132 0         0 return ( provides => $provides );
133             }
134              
135             sub requires {
136 1     1 1 2 my ( undef, @extra ) = @_; # Invocant unused
137             return {
138 1         16 'Astro::Coord::ECI' => 0.131,
139             'Astro::Coord::ECI::Moon' => 0.131,
140             'Astro::Coord::ECI::Star' => 0.131,
141             'Astro::Coord::ECI::Sun' => 0.131,
142             'Astro::Coord::ECI::TLE' => 0.131,
143             'Astro::Coord::ECI::TLE::Set' => 0.131,
144             'Astro::Coord::ECI::Utils' => 0.131, # for gm_strftime() ...
145             'Attribute::Handlers' => 0,
146             'Carp' => 0,
147             'Clone' => 0,
148             'Cwd' => 0,
149             'Exporter' => 0,
150             'File::Glob' => 0,
151             'File::HomeDir' => 0.93, # For my_dist_config
152             'File::Spec' => 0,
153             'File::Temp' => 0,
154             'Getopt::Long' => 2.39, # For getoptionsfromarray
155             'I18N::LangTags' => 0,
156             'I18N::LangTags::Detect' => 0,
157             'IO::File' => 1.14,
158             'IO::Handle' => 0,
159             'IPC::System::Simple' => 0,
160             'List::Util' => 0,
161             ## 'Params::Util' => 0.250,
162             'POSIX' => 0,
163             'Scalar::Util' => 1.26, # For isdual()
164             ## 'Task::Weaken' => 0,
165             'Template' => 2.21,
166             'Template::Provider' => 2.21,
167             'Text::Abbrev' => 0,
168             'Text::ParseWords' => 0,
169             'Text::Wrap' => 0,
170             'Time::Local' => 0,
171             constant => 0,
172             lib => 0,
173             parent => 0,
174             strict => 0,
175             utf8 => 0,
176             warnings => 0,
177             @extra,
178             };
179             }
180              
181             sub requires_perl {
182 1     1 1 2 return 5.008;
183             }
184              
185             sub script_files {
186             return [
187 0     0 1   'script/satpass2',
188             ];
189             }
190              
191             sub version_from {
192 0     0 1   return 'lib/Astro/App/Satpass2.pm';
193             }
194              
195             1;
196              
197             __END__