You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-panel/lib/NGCP/Panel/Utils/DataHal.pm

24 lines
584 B

package NGCP::Panel::Utils::DataHal;
use Moo;
extends 'Data::HAL';
#TODO: read parameters from the ngcp-panel config section if we will use more API format configs
#use MooseX::Configuration;
around 'BUILDARGS' => sub {
my $orig = shift;
my $class = shift;
my $params;
if ((scalar @_) == 1) {
($params) = @_;
} else {
$params = { @_ };
}
if( !defined $params->{forcearray_underneath} && !defined $params->{_forcearray_underneath} ){
$params->{_forcearray_underneath} = { embedded => 0 };
}
$class->$orig($params);
};
1;