Branch Coverage

lib/Mail/Toaster/Setup/Config.pm
Criterion Covered Total %
branch 1 100 1.0


line true false branch
24 2 0 if defined $p{'test_ok'}
31 0 0 unless $self->setup->refresh_config($file_path)
70 0 0 unless my(@lines) = $self->util->file_read($p{'file'})
74 0 0 unless my $search = $e->{'search'}
75 0 0 unless my $replace = $e->{'replace'}
79 0 0 if ($search2 and $search2 eq 'section')
83 0 0 if ($in)
84 0 0 unless $line =~ /^ \s* \} \s* $/msx
88 0 0 if ($search eq $line)
93 0 0 unless $in
99 0 0 if ($lines[$i] eq $search)
105 0 0 if (not $found and $search2)
107 0 0 if ($lines[$i] eq $search2)
115 0 0 unless $found or $e->{'nowarn'}
127 0 0 if $self->conf->{'toaster_hostname'} and $self->conf->{'toaster_hostname'} ne 'mail.example.com'
147 0 0 unless -e $config_dir
157 0 0 if -e $_->{'existing'} and not $_->{'overwrite'}
174 0 0 if ($self->conf->{'ssl_country'} eq 'SU')
183 0 0 if ($self->conf->{'ssl_state'} eq 'saxeT')
190 0 0 if ($self->conf->{'ssl_locality'} eq 'dnalraG')
197 0 0 if ($self->conf->{'ssl_organization'} eq 'moc.elpmaxE')
206 0 0 if ($self->conf->{'install_squirrelmail'} and $self->conf->{'install_squirrelmail_sql'} and $self->conf->{'install_squirrelmail_sql_pass'} eq 'chAnge7his')
213 0 0 if ($self->conf->{'install_roundcube'} and $self->conf->{'install_roundcube_db_pass'} eq 'To4st3dR0ndc@be')
219 0 0 if ($self->conf->{'install_spamassassin'} and $self->conf->{'install_spamassassin_sql'} and $self->conf->{'install_spamassassin_dbpass'} eq 'assSPAMing')
226 0 0 if ($self->conf->{'install_phpmyadmin'} and $self->conf->{'phpMyAdmin_controlpassword'} eq 'pmapass')
238 0 0 if $self->conf->{'toaster_admin_email'} and $self->conf->{'toaster_admin_email'} ne 'postmaster@example.com'
260 0 0 if $self->conf->{'vpopmail_mysql'}
265 0 0 if ($line =~ /^$key\s*=/)
274 0 0 -e $file_path ? :
0 0 unless my $r = $self->util->install_if_changed('newfile', '/tmp/toaster-watcher.conf', 'existing', $file_path, 'mode', '0640', 'clean', 1, 'notify', -e $file_path ? 1 : 0)
283 0 0 $r == 1 ? :
291 0 0 if $self->conf->{'toaster_test_email'} ne 'test@example.com'
304 0 0 if $self->conf->{'toaster_test_email_pass'} and $self->conf->{'toaster_test_email_pass'} ne 'cHanGeMe'
322 0 0 unless -r $file
325 0 0 if $Mail::Toaster::Setup::Config::OSNAME eq 'freebsd'
326 0 0 if $Mail::Toaster::Setup::Config::OSNAME eq 'darwin'
327 0 0 if $Mail::Toaster::Setup::Config::OSNAME eq 'linux'
335 0 0 if $line =~ /^#/
336 0 0 unless $line =~ /=/
340 0 0 if (defined $changes{$key} and $changes{$key} ne $val)
347 0 0 unless $status and $status eq 'changed'
350 0 0 unless $self->util->yes_or_no("config tweaks: The changes shown above are recommended for use on your system.\nMay I apply the changes for you?", 'timeout', 30)
362 0 0 if ($file =~ /(.*)-dist\z/)
375 0 0 unless $r
376 0 0 $r == 1 ? :
444 0 0 if $self->conf->{'install_mysql'}
445 0 0 unless $self->util->yes_or_no('Enable MySQL support?')
463 0 0 if not $hostname or $hostname ne 'jail.simerson.net'
495 0 0 unless $self->conf->{'vpopmail_mysql'}
497 0 0 if $self->conf->{'vpopmail_mysql_pass'} and $self->conf->{'vpopmail_mysql_pass'} ne 'supersecretword'