requires => {
'Catalyst' => '5.61',
'DateTime::Event::Cron' => 0,
- 'Set::Object' => '1.14',
+ 'Set::Scalar' => 0,
'Storable' => 0,
'YAML' => 0,
},
use DateTime::TimeZone;
use File::stat;
use NEXT;
-use Set::Object;
+use Set::Scalar;
use Storable qw/lock_store lock_retrieve/;
use YAML;
my $hosts_allow = $c->config->{scheduler}->{hosts_allow};
$hosts_allow = [$hosts_allow] unless ref($hosts_allow) eq 'ARRAY';
-
- my $ip = Set::Object->new( [ $c->req->address ] );
- my $allowed = Set::Object->new( $hosts_allow );
-
- return $ip->subset($allowed);
+ my $allowed = Set::Scalar->new( @{$hosts_allow} );
+ return $allowed->contains( $c->req->address );
}
# get the state from the state file