now uses All if the array is empty

This commit is contained in:
Zane C. B-H 2021-02-17 22:28:15 -06:00
rodič 612d686546
revize 6023e296a6
1 změnil soubory, kde provedl 6 přidání a 4 odebrání

Zobrazit soubor

@ -123,7 +123,12 @@ sub new{
}
# Will never match anything.
if ( ! defined $args{checks}[0] ){
die ('Nothing in the checks array');
$args{checks}[0] = {
type => 'All',
invert => 0,
args => {}
};
}
if ( ref( %{ $args{checks}[0] } ) eq 'HASH' ){
die ('The first item in the checks array is not a hash');
@ -144,9 +149,6 @@ sub new{
};
bless $self;
# will hold the created check objects
my @checks;
# Loads up each check or dies if it fails to.
my $check_int=0;
while( defined( $args{checks}[$check_int] ) ){