Branch Coverage

blib/lib/Mozilla/ProfilesIni.pm
Criterion Covered Total %
branch 54 102 52.9


line true false branch
103 0 0 unless ref $log and $log->isa('Log::Dispatch')
134 3 2 if ($$self{'create'})
136 0 3 unless $r
140 1 4 unless $r
168 0 3 unless (-d $path)
174 0 3 if (-e $ini_file) { }
175 0 0 if ($args{'ignore'}) { }
186 0 3 unless ($cfg->WriteConfig($ini_file))
191 0 3 unless (-e $ini_file)
224 4 1 if (my $ini_file = _catfile($path, 'profiles.ini')) { }
227 4 0 if ($cfg) { }
235 0 1 unless $profile_path
237 1 0 if ($profile_path) { }
243 0 1 unless ($name = $cfg->val("Profile$i", 'Name'))
263 1 3 if ($start_with_last and $name)
293 2 2 $args{'is_default'} ? :
298 1 3 unless ($def or keys %{$$self{'profiles'};})
306 4 0 if (-r $ini_file) { }
309 3 1 unless (-d $prof)
312 0 3 unless (mkdir $prof)
328 4 0 unless ($path)
339 0 4 unless (mkdir $path)
350 0 1 if ($$self{'profiles'}{$_}{'ProfileId'} eq $id)
362 0 1 if $def
363 1 0 if (defined $cfg->val($$data{'ProfileId'}, 'Default')) { }
370 3 1 if ($def) { }
377 4 0 $dir ? :
4 0 $dir ? :
396 0 4 unless ($cfg->RewriteConfig)
531 0 21 if (_catfile($self->profile_path('name', $name), $_))
559 169 80 if ($_[0]) { }
561 7 162 -d $path ? :
570 7 24 -r $path ? :
609 0 40 if ($path = _catdir($ENV{uc($type) . '_HOME'}))
612 0 40 if ($path = _catdir($ENV{'MOZILLA_HOME'}, ucfirst $type))
622 0 40 if ($path = _catdir($home, ".$type"))
625 0 40 if ($path = _catdir($home, '.mozilla', $type))
628 0 40 if ($path = _catdir($home, ucfirst $type))
631 0 40 if ($path = _catdir($home, 'Mozilla', ucfirst $type))
635 0 40 if ($^O eq 'darwin') { }
0 40 elsif ($^O eq 'MSWin32') { }
0 40 elsif ($^O eq 'cygwin') { }
636 0 0 if ($path = _catdir($home, 'Library', 'Application Support', ucfirst $type))
640 0 0 if ($path = _catdir($home, 'Library', 'Application Support', 'Mozilla', ucfirst $type))
644 0 0 if ($path = _catdir($home, 'Library', ucfirst $type))
647 0 0 if ($path = _catdir($home, 'Library', 'Mozilla', ucfirst $type))
653 0 0 if ($path = _catdir($program_files, ucfirst $type))
656 0 0 if ($path = _catdir($program_files, 'Mozilla', ucfirst $type))
669 0 0 unless ((caller 1)[3] =~ /_find_profile_path$/)
702 2 7 unless $args{'message'} =~ /\n$/
703 9 0 if $$self{'log'}