Data/Sah/Filter/perl/Firefox/check_profile_name_exists.pm

filter: Statementstmt 65.0% 13 / 20 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 2 totaltotal 53.3% 16 / 30 CC 2 SCAR 10.4
CC
2
Cov
59%
filter
6.0
meta
2.0
BEGIN
1.0
CRAP 2.8
↑ Summary Data/Sah/Value/perl/Firefox/first_local_profile_name.pm »
1 package Data::Sah::Filter::perl::Firefox::check_profile_name_exists;
2  
3 1 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
8 1 our $DATE = '2023-06-14'; # DATE
9 1 our $DIST = 'Sah-Schemas-Firefox'; # DIST
10 1 our $VERSION = '0.008'; # VERSION
11  
12 0 ▶sub meta {
Subroutine meta: not called CC=1 SCAR=6.9
Pod undocumented
13 +{
14 0 v => 1,
15 summary => 'Check that profile name exists in local Firefox installation',
16 might_fail => 1,
17 };
18 }
19  
20 0 ▶sub filter {
Subroutine filter: not called CC=2 SCAR=17.9
Pod undocumented
21 0 my %args = @_;
22  
23 0 my $dt = $args{data_term};
24  
25 0 my $res = {};
26 0 ▶ $res->{modules}{"Firefox::Util::Profile"} //= 0;
Condition0%0/2
$res->{"modules"}{"Firefox::Util::Profile"} //= 0
l!l
00
MC/DC0%0/1
$res->{"modules"}{"Firefox::Util::Profile"} //= 0
$res->{"modules"}{"Firefox::Util::Profile"}
Truth table0%0/2
A
A= $res->{"modules"}{"Firefox::Util::Profile"}
Aresult
11
00
27 0 $res->{expr_filter} = join(
28 "",
29 "do { ",
30 " my \$tmp = $dt; ",
31 " my \$dir = Firefox::Util::Profile::get_firefox_profile_dir(\$tmp); ",
32 " if (!defined \$dir) { [\"No such Firefox profile '\$tmp'\", \$tmp] } else { [undef, \$tmp] } ",
33 "}",
34 );
35  
36 0 $res;
37 }
38  
39 1 1;
40 # ABSTRACT:
41  
42 __END__
↑ Summary Data/Sah/Value/perl/Firefox/first_local_profile_name.pm »