blib/lib/App/hopen/Util.pm

filter: Statementstmt 100% 23 / 23 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 1 / 1 totaltotal 100% 33 / 33 CC 2 SCAR 2.2
CC
2
Cov
100%
isMYH
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/App/hopen/G/FilesCmd.pm ↑ Summary blib/lib/App/hopen/G/AssetOp.pm »
1 package App::hopen::Util;
2 4 our $VERSION = '0.000013'; # TRIAL
3  
4 # Docs {{{1
5  
6 =head1 NAME
7  
8 App::hopen::Util - general utilities for App::hopen
9  
10 =cut
11  
12 4 ▶use strict; use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
13 4 ▶use parent 'Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
14 use vars::i {
15 4 '@EXPORT' => [qw(isMYH)],
16 '@EXPORT_OK' => [qw(MYH)]
17 4 ▶};
Subroutine BEGIN: called CC=1 SCAR=0.0
18 4 use vars::i '%EXPORT_TAGS' => {
19 default => [@EXPORT],
20 all => [@EXPORT, @EXPORT_OK],
21 4 ▶};
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 =head1 CONSTANTS
24  
25 =head2 MYH
26  
27 The name C<MY.hopen.pl>, centralized here. Not exported by default.
28  
29 =cut
30  
31 4 ▶use constant MYH => 'MY.hopen.pl';
Subroutine BEGIN: called CC=1 SCAR=0.0
32  
33 =head1 FUNCTIONS
34  
35 =head2 isMYH
36  
37 Returns truthy if the given argument is the name of a C<MY.hopen.pl> file.
38 See also L</MYH>.
39  
40 =cut
41  
42 sub isMYH {
43 27 ▶ my $name = @_ ? $_[0] : $_;
Subroutine isMYH: called CC=2 SCAR=6.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
@_ ? : 17 10 27
44 27 return ($name =~ /\b\Q@{[MYH]}\E$/)
45 } #isMYH()
46  
47 4 1;
« blib/lib/App/hopen/G/FilesCmd.pm ↑ Summary blib/lib/App/hopen/G/AssetOp.pm »