Branch Coverage

bin/clearpress
Criterion Covered Total %
branch 11 56 19.6


line true false branch
39 0 1 if ($opts->{'help'})
40 0 0 unless print "Usage Example:\n $main::PROGRAM_NAME --new GrandKids 'child->family child(name,birthday:date) family(name,address,city,state,zip)'\n"
47 0 1 if ($opts->{'version'})
48 0 0 unless print 'ClearPress v' . 'ClearPress'->VERSION . "\n"
54 1 0 unless ($opts->{'new'})
61 0 0 if ($app ne $opts->{'new'})
74 0 0 if ($structure =~ /\S+[(]\S+[)]/msx) { }
0 0 elsif ($structure =~ /\S+\->\S+/msx) { }
86 0 0 unless print {*STDERR;} "$table has $name of type $type\n"
96 0 0 unless print {*STDERR;} "$one has a $many\n$many has many @{[PL($one)];}\n"
117 0 0 unless open my $fh, '>', $cfg
118 0 0 unless print {$fh;} $main::PROGRAM_NAME, map({" '${_}'";} @argvcopy), "\n"
119 0 0 unless close $fh
121 0 0 if ($opts->{'driver'} eq 'mysql') { }
125 0 0 unless print qq[You now need to configure your database.\n1. Check and/or modify $app/data/config.ini\n2. If necessary create a database, something like this:\n mysqladmin -uroot create $app\n3. cat @{[map({"$app/data/schema/$_.mysql \\\n ";} @{$precedence;})];} | mysql -uroot $app\n\nNote you may need to create your new schema in order, depending on your foreign key constraints.\n]
139 0 0 unless print "You now need to configure your database.\n1. Check and/or modify $app/data/config.ini\n2. If necessary create a database, something like this:\n cat $app/data/schema/*.SQLite | sqlite3 $app/$app\n"
154 0 0 unless (scalar keys %{$cache;})
161 0 0 unless print "Read @{[length $str];} bytes for $field\n"
225 0 0 if (not $opts->{'yes'} and -e $fn)
226 0 0 unless print "$fn exists. Overwrite? [y/N] "
227 0 0 if _yn('N')
231 0 0 unless open my $fh, '>', $fn
232 0 0 unless $tt->process($tmpl, $opts, $fh)
233 0 0 unless close $fh
238 9 9 unless $main::a->{'has_a'}
239 7 11 unless $main::b->{'has_a'}
241 6 12 if (scalar grep({$_ eq $main::b->{'name'};} @{$a_deps;}))
245 6 6 if (scalar grep({$_ eq $main::a->{'name'};} @{$b_deps;}))