From ab70e4e3553b25501589c28467695eee66b25bca Mon Sep 17 00:00:00 2001 From: Gerhard Jungwirth Date: Thu, 18 Jan 2018 11:02:01 +0100 Subject: [PATCH] TT#30650 fix some syntax errors these errors were missing imports and were discovered with "perl -c". DbStrings.pm is a generated file, therefore to comply with the syntax check here we need to change the generator. (this is completely cosmetic) Change-Id: Ia2dba1f04cbdc3bb76245b19de1f34c8c8a3a2c0 --- lib/NGCP/Panel/Utils/DbStrings.pm | 2 ++ lib/NGCP/Panel/Utils/IntervalTree/Node.pm | 1 + script/ngcp_panel_dump_db_strings.pl | 5 +++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/NGCP/Panel/Utils/DbStrings.pm b/lib/NGCP/Panel/Utils/DbStrings.pm index f92e37b5a0..b620a94e06 100644 --- a/lib/NGCP/Panel/Utils/DbStrings.pm +++ b/lib/NGCP/Panel/Utils/DbStrings.pm @@ -4,6 +4,7 @@ use warnings; use strict; sub localize { + my $c; $c->loc('Lock Level'); $c->loc('See "lock_voip_account_subscriber" for a list of possible values. A lock value of "none" will not be returned to the caller. Read-only setting.'); @@ -195,6 +196,7 @@ sub localize { } sub form_strings { + my $c; #NGCP::Panel::Form::BillingFee #NGCP::Panel::Form::BillingFeeUpload diff --git a/lib/NGCP/Panel/Utils/IntervalTree/Node.pm b/lib/NGCP/Panel/Utils/IntervalTree/Node.pm index 6789248ef9..8e523fe349 100644 --- a/lib/NGCP/Panel/Utils/IntervalTree/Node.pm +++ b/lib/NGCP/Panel/Utils/IntervalTree/Node.pm @@ -3,6 +3,7 @@ package NGCP::Panel::Utils::IntervalTree::Node; use strict; use warnings; +use POSIX (); use List::Util qw(min max); my $EMPTY_NODE = __PACKAGE__->new(0, 0, undef); diff --git a/script/ngcp_panel_dump_db_strings.pl b/script/ngcp_panel_dump_db_strings.pl index 1a3fee270a..7485056b3d 100755 --- a/script/ngcp_panel_dump_db_strings.pl +++ b/script/ngcp_panel_dump_db_strings.pl @@ -17,13 +17,14 @@ my $s = NGCP::Schema->connect; open(my $fh, ">", $filepath) or die "cannot open file $!"; -print $fh <resultset('voip_preference_groups')->all) { if ($row->name); } -print $fh " return;\n}\n\nsub form_strings {\n\n"; +print $fh " return;\n}\n\nsub form_strings {\n my \$c;\n\n"; my $path = 'lib/NGCP/Panel/Form/*.pm lib/NGCP/Panel/Form/*/*.pm'; my @files = < $path >;