blib/lib/App/ThisDist/OnMetaCPAN.pm

filter: Statementstmt 55.5% 15 / 27 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 100% 2 / 2 totaltotal 51.3% 19 / 37 CC 3 SCAR 14.7
CC
3
Cov
48%
this_dist_on_metacpan
6.0
this_mod_on_metacpan
6.0
BEGIN
1.0
CRAP 4.3
↑ Summary
1 package App::ThisDist::OnMetaCPAN;
2  
3 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
4 1 our $DATE = '2021-03-07'; # DATE
5 1 our $DIST = 'App-ThisDist-OnMetaCPAN'; # DIST
6 1 our $VERSION = '0.002'; # VERSION
7  
8 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 our %SPEC;
12  
13 1 $SPEC{':package'} = {
14 v => 1.1,
15 summary => 'this-dist-on-metacpan and some other CLIs',
16 };
17  
18 $SPEC{this_dist_on_metacpan} = {
19 1 v => 1.1,
20 summary => 'Open MetaCPAN release page for "the current distribution"',
21 description => <<'_',
22  
23 This is a thin wrapper for <prog:this-dist>. See its documentation for details
24 on how the script determines "the current distribution".
25  
26 _
27 args => {},
28 deps => {
29 prog => 'this-dist',
30 },
31 };
32 0 ▶sub this_dist_on_metacpan {
Subroutine this_dist_on_metacpan: not called CC=2 SCAR=17.9
Pod documented
33 0 require Browser::Open;
34  
35 0 my $dist = `this-dist`;
36 0 ▶ return [412, "this-dist failed"] unless length $dist;
Branch: 1 branch
BranchTrueFalseTotal
unless length $dist 0 0 0
37 0 chomp($dist);
38 0 Browser::Open::open_browser("https://metacpan.org/release/$dist");
39 0 [200];
40 }
41  
42 $SPEC{this_mod_on_metacpan} = {
43 1 v => 1.1,
44 args => {},
45 summary => 'Open MetaCPAN module page for "the current module"',
46 description => <<'_',
47  
48 This is a thin wrapper for <prog:this-mod>. See its documentation for details on
49 how the script determines "the current module".
50  
51 _
52 deps => {
53 prog => 'this-mod',
54 },
55 };
56 0 ▶sub this_mod_on_metacpan {
Subroutine this_mod_on_metacpan: not called CC=2 SCAR=17.9
Pod documented
57 0 require Browser::Open;
58  
59 0 my $mod = `this-mod`;
60 0 ▶ return [412, "this-mod failed"] unless length $mod;
Branch: 1 branch
BranchTrueFalseTotal
unless length $mod 0 0 0
61 0 chomp($mod);
62 0 Browser::Open::open_browser("https://metacpan.org/pod/$mod");
63 0 [200];
64 }
65  
66 1 1;
67 # ABSTRACT: this-dist-on-metacpan and some other CLIs
68  
69 __END__
↑ Summary