| line |
true |
false |
branch |
|
128
|
0 |
8 |
if scalar keys %args != 0 |
|
132
|
0 |
8 |
unless Data::Validate::Type::is_instance($dbh, 'class', 'DBI::db') |
|
263
|
45 |
3 |
if defined $args{$arg} and $args{$arg} ne '' |
|
266
|
0 |
0 |
if defined $limit_rate_timespan and !($limit_rate_timespan =~ /^\d+$/) || $limit_rate_timespan == 0 |
|
268
|
0 |
14 |
if defined $limit_rate_unique_key and length $limit_rate_unique_key == 0 |
|
270
|
0 |
14 |
if defined $limit_rate_timespan != defined $limit_rate_unique_key |
|
274
|
0 |
14 |
if (defined $limit_rate_timespan) |
|
276
|
0 |
0 |
if (not defined $self->get_cache('key', $limit_rate_unique_key)) { } |
|
296
|
14 |
0 |
unless (defined $args{'file'} and defined $args{'line'}) |
|
300
|
14 |
0 |
unless defined $args{'file'} |
|
302
|
14 |
0 |
unless defined $args{'line'} |
|
308
|
14 |
0 |
defined $audit_event ? : |
|
492
|
17 |
0 |
unless defined $dbh |
|
496
|
15 |
2 |
unless defined $order_by_array |
|
500
|
0 |
17 |
if scalar keys %args != 0 |
|
506
|
0 |
17 |
if defined $dbh and not Data::Validate::Type::is_instance($dbh, 'class', 'DBI::db') |
|
510
|
0 |
17 |
unless Data::Validate::Type::is_arrayref($order_by_array) |
|
512
|
0 |
17 |
if scalar @$order_by_array == 0 |
|
514
|
0 |
17 |
if scalar(@$order_by_array) % 2 == 1 |
|
521
|
0 |
17 |
unless $sort_order =~ /^(?:ASC|DESC)$/i |
|
528
|
1 |
16 |
if (defined $subjects) |
|
530
|
0 |
1 |
unless Data::Validate::Type::is_arrayref($subjects) |
|
535
|
0 |
1 |
unless defined $$subject{'type'} |
|
538
|
0 |
1 |
unless defined $$subject{'include'} |
|
541
|
0 |
1 |
if defined $$subject{'ids'} and not Data::Validate::Type::is_arrayref($$subject{'ids'}) |
|
547
|
2 |
15 |
if (defined $values) |
|
549
|
0 |
2 |
unless Data::Validate::Type::is_arrayref($values) |
|
554
|
0 |
2 |
unless defined $$value{'name'} |
|
557
|
0 |
2 |
unless defined $$value{'include'} |
|
560
|
0 |
2 |
unless defined $$value{'values'} and Data::Validate::Type::is_arrayref($$value{'values'}) |
|
566
|
6 |
11 |
if (defined $ip_ranges) |
|
568
|
0 |
6 |
unless Data::Validate::Type::is_arrayref($ip_ranges) |
|
573
|
0 |
6 |
unless defined $$ip_range{'include'} |
|
578
|
0 |
6 |
unless defined $$ip_range{'begin'} |
|
580
|
6 |
0 |
if $$ip_range{'begin'} =~ /\./ |
|
582
|
0 |
6 |
unless $$ip_range{'begin'} =~ /\A\d+\z/ |
|
587
|
0 |
6 |
unless defined $$ip_range{'end'} |
|
589
|
6 |
0 |
if $$ip_range{'end'} =~ /\./ |
|
591
|
0 |
6 |
unless $$ip_range{'end'} =~ /\A\d+\z/ |
|
597
|
6 |
11 |
if (defined $date_ranges) |
|
599
|
0 |
6 |
unless Data::Validate::Type::is_arrayref($date_ranges) |
|
604
|
0 |
6 |
unless defined $$date_range{'include'} |
|
607
|
0 |
6 |
unless defined $$date_range{'begin'} |
|
610
|
0 |
6 |
unless defined $$date_range{'end'} |
|
620
|
6 |
11 |
if (defined $ip_ranges) |
|
629
|
0 |
6 |
unless $$ip_range{'include'} |
|
635
|
6 |
0 |
if scalar @or_clause != 0 |
|
640
|
1 |
16 |
if (defined $subjects) |
|
648
|
1 |
0 |
if defined $$subject{'ids'} and scalar @{$$subject{'ids'};} != 0 |
|
650
|
0 |
1 |
unless $$subject{'include'} |
|
656
|
1 |
0 |
if scalar @or_clause != 0 |
|
661
|
2 |
15 |
if (defined $values) |
|
669
|
2 |
0 |
if defined $$value{'values'} and scalar @{$$value{'values'};} != 0 |
|
671
|
0 |
2 |
unless $$value{'include'} |
|
677
|
2 |
0 |
if (scalar @or_clause != 0) |
|
685
|
6 |
11 |
if (defined $date_ranges) |
|
694
|
0 |
6 |
unless $$date_range{'include'} |
|
700
|
6 |
0 |
if scalar @or_clause != 0 |
|
705
|
14 |
3 |
if (defined $events) |
|
711
|
14 |
0 |
$$data{'include'} ? : |
|
715
|
14 |
0 |
if scalar @or_clause != 0 |
|
720
|
0 |
17 |
if (defined $logged_in) |
|
726
|
0 |
0 |
$$data{'include'} ? : |
|
730
|
0 |
0 |
if scalar @or_clause != 0 |
|
733
|
0 |
17 |
if (defined $affected) |
|
739
|
0 |
0 |
$$data{'include'} ? : |
|
743
|
0 |
0 |
if scalar @or_clause != 0 |
|
749
|
0 |
17 |
if scalar @clause == 0 |
|
797
|
0 |
1 |
if scalar keys %args != 0 |
|
801
|
0 |
1 |
unless defined $drop_if_exist and $drop_if_exist |
|
807
|
0 |
1 |
unless $database_type =~ /^(?:SQLite|mysql|Pg)$/x |
|
923
|
1 |
0 |
if ($drop_if_exist) |
|
925
|
0 |
1 |
unless $database_handle->do('DROP TABLE IF EXISTS audit_search') |
|
927
|
0 |
1 |
unless $database_handle->do('DROP TABLE IF EXISTS audit_events') |
|
932
|
0 |
1 |
unless $database_handle->do($$tables_sql{$database_type}{'audit_events'}) |
|
936
|
0 |
1 |
unless $database_handle->do($$tables_sql{$database_type}{'audit_search'}) |
|
941
|
0 |
1 |
if ($database_type eq 'Pg') |
|
957
|
0 |
0 |
unless $database_handle->do($index_sql) |
|
1014
|
0 |
0 |
if scalar keys %args != 0 |
|
1018
|
0 |
0 |
unless defined $key and $key =~ /\w/ |
|
1023
|
0 |
0 |
unless defined $memcache |
|
1047
|
0 |
0 |
if scalar keys %args != 0 |
|
1051
|
0 |
0 |
unless defined $key and $key =~ /\w/ |
|
1056
|
0 |
0 |
unless defined $memcache |
|
1058
|
0 |
0 |
unless $memcache->set($key, $value, $expire_time) |
|
1098
|
1 |
13 |
if (defined $$data{'diff'}) |
|
1100
|
0 |
1 |
unless Data::Validate::Type::is_arrayref($$data{'diff'}) |
|
1126
|
1 |
0 |
defined $diff ? : |
|
1141
|
1 |
13 |
if (defined $$data{'information'}) |
|
1156
|
0 |
14 |
unless defined $$data{'event_time'} |
|
1190
|
4 |
10 |
if (defined $search_data) |
|
1202
|
5 |
0 |
unless Data::Validate::Type::is_arrayref($values) |
|
1207
|
0 |
5 |
unless $sth->execute($$data{'audit_event_id'}, lc $name, lc($value || '')) |