add function in catalog

This commit is contained in:
garnier-quentin 2019-05-31 09:08:47 +02:00
parent f3241cbc29
commit b395c824bd
1 changed files with 11 additions and 1 deletions

View File

@ -25,7 +25,7 @@ use warnings;
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(catalog_status_threshold);
our @EXPORT_OK = qw(catalog_status_threshold catalog_status_calc);
sub catalog_status_threshold {
my ($self, %options) = @_;
@ -59,6 +59,16 @@ sub catalog_status_threshold {
return $status;
}
sub catalog_status_calc {
my ($self, %options) = @_;
foreach (keys %{$options{new_datas}}) {
if (/^$self->{instance}_(.*)/) {
$self->{result_values}->{$1} = $options{new_datas}->{$_};
}
}
}
1;
__END__