diff --git a/lib/NGCP/Panel/Controller/Reseller.pm b/lib/NGCP/Panel/Controller/Reseller.pm index dfcb2f80e2..ded39267bb 100644 --- a/lib/NGCP/Panel/Controller/Reseller.pm +++ b/lib/NGCP/Panel/Controller/Reseller.pm @@ -477,11 +477,11 @@ sub create_defaults :Path('create_defaults') :Args(0) :Does(ACL) :ACLDetachTo('/ $billing->txn_do(sub { $r{contacts} = $billing->resultset('contacts')->create({ %{ $defaults{contacts} } }); $r{contracts} = $billing->resultset('contracts')->create({ - %{ $defaults{contracts} }, + %{ $defaults{contracts} }, ## no critic (ProhibitCommaSeparatedStatements) contact_id => $r{contacts}->id, }); $r{resellers} = $billing->resultset('resellers')->create({ - %{ $defaults{resellers} }, + %{ $defaults{resellers} }, ## no critic (ProhibitCommaSeparatedStatements) contract_id => $r{contracts}->id, }); my $mappings_to_create = []; @@ -505,7 +505,7 @@ sub create_defaults :Path('create_defaults') :Args(0) :Does(ACL) :ACLDetachTo('/ $r{billing_mappings} = $r{contracts}->billing_mappings; $r{admins} = $billing->resultset('admins')->create({ - %{ $defaults{admins} }, + %{ $defaults{admins} }, ## no critic (ProhibitCommaSeparatedStatements) reseller_id => $r{resellers}->id, }); NGCP::Panel::Utils::ProfilePackages::create_initial_contract_balances(c => $c, diff --git a/lib/NGCP/Panel/Controller/Rewrite.pm b/lib/NGCP/Panel/Controller/Rewrite.pm index cdb2936c55..21853bc49b 100644 --- a/lib/NGCP/Panel/Controller/Rewrite.pm +++ b/lib/NGCP/Panel/Controller/Rewrite.pm @@ -167,7 +167,7 @@ sub set_clone :Chained('set_base') :PathPart('clone') { my $schema = $c->model('DB'); $schema->txn_do(sub { my $new_set = $c->stash->{sets_rs}->create({ - %{ $form->values }, + %{ $form->values }, ## no critic (ProhibitCommaSeparatedStatements) reseller_id => $c->stash->{set_result}->reseller_id, }); my @old_rules = $c->stash->{set_result}->voip_rewrite_rules->all; diff --git a/lib/NGCP/Panel/Controller/SubscriberProfile.pm b/lib/NGCP/Panel/Controller/SubscriberProfile.pm index f63eda5fe8..ec3d5a2625 100644 --- a/lib/NGCP/Panel/Controller/SubscriberProfile.pm +++ b/lib/NGCP/Panel/Controller/SubscriberProfile.pm @@ -283,7 +283,7 @@ sub set_clone :Chained('set_base') :PathPart('clone') :Does(ACL) :ACLDetachTo('/ } delete $form->values->{reseller}; my $new_set = $schema->resultset('voip_subscriber_profile_sets')->create({ - %{ $form->values }, + %{ $form->values }, ## no critic (ProhibitCommaSeparatedStatements) reseller_id => $c->stash->{set}->reseller_id, }); foreach my $prof($c->stash->{set}->voip_subscriber_profiles->all) { diff --git a/lib/NGCP/Panel/Utils/BillingMappings.pm b/lib/NGCP/Panel/Utils/BillingMappings.pm index 1d27bc72d1..c0ea671f6d 100644 --- a/lib/NGCP/Panel/Utils/BillingMappings.pm +++ b/lib/NGCP/Panel/Utils/BillingMappings.pm @@ -501,7 +501,7 @@ sub get_billingmappings_timeline_data { $c->log->debug("timeline range $start - $end"); #the max start date (of mappings with NULL end date) less than #the visible range end will become the range start: - my $max_start_date = $contract->billing_mappings->search({ + my $max_start_date = $contract->billing_mappings->search({ ## no critic (ProhibitCommaSeparatedStatements) ($end ? (start_date => [ -or => { '<=' => $end }, { '=' => undef }, @@ -518,7 +518,7 @@ sub get_billingmappings_timeline_data { $start = $max_start_date->start_date; } } - my $res = $contract->billing_mappings->search({ + my $res = $contract->billing_mappings->search({ ## no critic (ProhibitCommaSeparatedStatements) ($end ? (start_date => ($start ? [ -and => { '<=' => $end },{ #hide mappings beginning after range end '>=' => $start #and beginning before range start (max_start_date). diff --git a/lib/NGCP/Panel/Utils/Contract.pm b/lib/NGCP/Panel/Utils/Contract.pm index dcb65ae2fa..7814867dac 100644 --- a/lib/NGCP/Panel/Utils/Contract.pm +++ b/lib/NGCP/Panel/Utils/Contract.pm @@ -113,7 +113,7 @@ sub get_contract_rs { my ($c,$schema,$include_terminated) = @params{qw/c schema include_terminated/}; $schema //= $c->model('DB'); my $rs = $schema->resultset('contracts')->search({ - $include_terminated ? () : ('me.status' => { '!=' => 'terminated' }), + $include_terminated ? () : ('me.status' => { '!=' => 'terminated' }), ## no critic (ProhibitCommaSeparatedStatements) },{ join => 'product', }); diff --git a/lib/NGCP/Panel/Utils/Preferences.pm b/lib/NGCP/Panel/Utils/Preferences.pm index c0395597bd..59d1f69fc7 100644 --- a/lib/NGCP/Panel/Utils/Preferences.pm +++ b/lib/NGCP/Panel/Utils/Preferences.pm @@ -945,7 +945,7 @@ sub get_preferences_rs { 'contract_location' => [qw/voip_contract_preferences contract_location_pref location_id/], ); my $pref_rs = $schema->resultset($config{$preferences_type}->[0])->search({ - 'attribute.'.$config{$preferences_type}->[1] => 1, + 'attribute.'.$config{$preferences_type}->[1] => 1, ## no critic (ProhibitCommaSeparatedStatements) $attribute ? ( 'attribute.attribute' => (('ARRAY' eq ref $attribute) ? { '-in' => $attribute } : $attribute ) ) : () , $item_id ? ('me.'.$config{$preferences_type}->[2] => $item_id) : (), },{ diff --git a/t/api-rest/api-customercontacts.t b/t/api-rest/api-customercontacts.t index 31bb1452e1..2fe22a4a02 100644 --- a/t/api-rest/api-customercontacts.t +++ b/t/api-rest/api-customercontacts.t @@ -399,7 +399,7 @@ sub _update_customer { $req->header('Content-Type' => 'application/json'); $req->header('Prefer' => 'return=representation'); $req->content(JSON::to_json({ - %$customer, + %$customer, ## no critic (ProhibitCommaSeparatedStatements) @further_opts, })); $res = $ua->request($req); diff --git a/t/api-rest/api-events.t b/t/api-rest/api-events.t index bc5bf0775d..4b8bcca945 100644 --- a/t/api-rest/api-events.t +++ b/t/api-rest/api-events.t @@ -465,7 +465,7 @@ my %customer_map = (); pilot_primary_alias_username_after => $cc.$ac.$sn, ); _check_event_history("start_profile when creating a pbx pilot subscriber w alias: ",$pilot_subscriber->{id},"%profile",[ - { %pilot_event, + { %pilot_event, ## no critic (ProhibitCommaSeparatedStatements) type => "start_profile", old_status => '', @@ -510,7 +510,7 @@ my %customer_map = (); ); _check_event_history("start_profile when creating a pbx extension subscriber w alias: ",$subscriber->{id},"%profile",[ - { %subscriber_event, + { %subscriber_event, ## no critic (ProhibitCommaSeparatedStatements) type => "start_profile", old_status => '', @@ -921,7 +921,7 @@ sub _update_subscriber { $req->header('Content-Type' => 'application/json'); $req->header('Prefer' => 'return=representation'); $req->content(JSON::to_json({ - %$subscriber, + %$subscriber, ## no critic (ProhibitCommaSeparatedStatements) @further_opts, })); $res = $ua->request($req); diff --git a/t/api-rest/api-lnp.t b/t/api-rest/api-lnp.t index c4c9d00fe9..6faeb54b96 100644 --- a/t/api-rest/api-lnp.t +++ b/t/api-rest/api-lnp.t @@ -218,7 +218,7 @@ sub _update_lnp_number { $req->header('X-Fake-Clienttime' => _get_fake_clienttime_now()); $req->header('Prefer' => 'return=representation'); $req->content(JSON::to_json({ - %$number, + %$number, ## no critic (ProhibitCommaSeparatedStatements) %further_opts, })); $res = $ua->request($req); diff --git a/t/api-rest/api-subscribers-groups.t b/t/api-rest/api-subscribers-groups.t index c0908fb644..2c6040b9d3 100644 --- a/t/api-rest/api-subscribers-groups.t +++ b/t/api-rest/api-subscribers-groups.t @@ -170,7 +170,7 @@ sub _update_subscriber { $req->header('Content-Type' => 'application/json'); $req->header('Prefer' => 'return=representation'); $req->content(JSON::to_json({ - %$subscriber, + %$subscriber, ## no critic (ProhibitCommaSeparatedStatements) @further_opts, })); $res = $ua->request($req); diff --git a/t/api-rest/api-systemcontacts.t b/t/api-rest/api-systemcontacts.t index d6360ba304..9e38094bb7 100644 --- a/t/api-rest/api-systemcontacts.t +++ b/t/api-rest/api-systemcontacts.t @@ -345,7 +345,7 @@ sub _update_contract { $req->header('Content-Type' => 'application/json'); $req->header('Prefer' => 'return=representation'); $req->content(JSON::to_json({ - %$contract, + %$contract, ## no critic (ProhibitCommaSeparatedStatements) @further_opts, })); $res = $ua->request($req); diff --git a/t/api-rest/api-voicemailgreetings.t b/t/api-rest/api-voicemailgreetings.t index 8a8fe5a63f..b1eed99616 100644 --- a/t/api-rest/api-voicemailgreetings.t +++ b/t/api-rest/api-voicemailgreetings.t @@ -99,7 +99,7 @@ if(ok($soxi_output =~/GSM/, "Check that we converted wav to GSM encoding:".$soxi diag("Check empty file:"); #btw - other vriant of tha put data - closer to stored. will be changed by Collection::encode_content my ($res_put_empty,$content_put_empty) = $test_machine->request_put( { - %{$test_machine->DATA_ITEM_STORE}, + %{$test_machine->DATA_ITEM_STORE}, ## no critic (ProhibitCommaSeparatedStatements) greetingfile => [ dirname($0).'/resources/empty.wav' ], } ); $test_machine->http_code_msg(422, "check response code on put empty file", $res_put_empty, $content_put_empty); diff --git a/t/lib/Test/FakeData.pm b/t/lib/Test/FakeData.pm index 1ad93fef40..a0fa5dccc5 100644 --- a/t/lib/Test/FakeData.pm +++ b/t/lib/Test/FakeData.pm @@ -472,7 +472,7 @@ sub process_data{ $collections_slice //= [keys %$data]; foreach my $collection_name( @$collections_slice ){ if($self->FLAVOUR && exists $data->{$collection_name}->{flavour} && exists $data->{$collection_name}->{flavour}->{$self->FLAVOUR}){ - $data = {%$data, %{$data->{$collection_name}->{flavour}->{$self->FLAVOUR}}}, + $data = {%$data, %{$data->{$collection_name}->{flavour}->{$self->FLAVOUR}}}; } } #$self->clear_db($data);