blib/lib/Banal/Dist/Util.pm untested

filter: Statementstmt 0.0% 0 / 28 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 41 CC 2 SCAR 10.6
CC
2
Cov
0%
pause_config_alt
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.9
1 use 5.014; # because we use the 'state' and 'non-destructive substitution' feature (s///r)
2 use strict;
3 use warnings;
4  
5 package Banal::Dist::Util; # git description: v0.003-2-g3efaa56
6 # vim: set ts=2 sts=2 sw=2 tw=115 et :
7 # ABSTRACT: General purpose utility collection mainly used by <Dist::Zilla::*::Author::TABULO>
8 # KEYWORDS: author utility
9  
10 our $VERSION = '0.004';
11 # AUTHORITY
12  
13  
14 use Path::Tiny qw(path);
15 use Data::Printer; # DEBUG aid.
16  
17 use Exporter::Shiny qw( pause_config );
18  
19 use namespace::autoclean;
20  
21  
22 # return username, password from ~/.pause
23 sub pause_config_alt # Hmmm. We've got a similar named routine in *::Pause.pm
24 {
25 my $file = path($ENV{HOME} // 'oops', '.pause');
26 return if not -e $file;
27  
28 my ($username, $password) = map {
29 my (undef, $val) = split ' ', $_; $val # awk-style whitespace splitting
30 } $file->lines;
31 }
32  
33  
34  
35  
36  
37  
38  
39 1;
40  
41 __END__