[X2Go-Commits] [x2goserver] 64/99: {X2Go/Server/Agent/NX/Options.pm, x2goserver/bin/x2goupdateoptionsstring}: fix/silence a few Perl::Critic warnings.
git-admin at x2go.org
git-admin at x2go.org
Mon Dec 28 06:10:49 CET 2020
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goserver.
commit 486611dbf1679ee218b07a7c1042bf4d91dd5b0b
Author: Mihai Moldovan <ionic at ionic.de>
Date: Mon Nov 23 05:31:11 2020 +0100
{X2Go/Server/Agent/NX/Options.pm,x2goserver/bin/x2goupdateoptionsstring}: fix/silence a few Perl::Critic warnings.
---
X2Go/Server/Agent/NX/Options.pm | 8 +++++++-
debian/changelog | 3 +++
x2goserver/bin/x2goupdateoptionsstring | 12 ++++++------
3 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/X2Go/Server/Agent/NX/Options.pm b/X2Go/Server/Agent/NX/Options.pm
index 83bfb70b..90132422 100644
--- a/X2Go/Server/Agent/NX/Options.pm
+++ b/X2Go/Server/Agent/NX/Options.pm
@@ -153,7 +153,13 @@ sub parse_options {
# Thus going the manual route here.
my $last_pos = rindex ($last_component, q{:});
+ # There is no English variant for this variable and it's deprecated
+ # anyway, replaced by the index 0 in most cases.
+ # We'll keep it for backwards compatibility for now and disable the
+ # warning.
+ ## no critic (Variables::ProhibitPunctuationVars)
if ($[ > $last_pos) {
+ ## critic (Variables::ProhibitPunctuationVars)
print {*STDERR} "No display port seperator found in the options string. Erroring out.\n";
$error_detected = 1;
}
@@ -1108,6 +1114,6 @@ both values match.
This manual has been written by
Mihai Moldovan L<E<lt>ionic at ionic.deE<gt>|mailto:ionic at ionic.de> for the X2Go
-project (L<https://www.x2go.org>).
+project (L<https://www.x2go.org|https://www.x2go.org>).
=cut
diff --git a/debian/changelog b/debian/changelog
index 40cd42aa..0682e3f5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -313,6 +313,9 @@ x2goserver (4.1.0.4-0x2go1.2) UNRELEASED; urgency=medium
abbreviation parsing into a separate function to take out nesting
complexity. This trades off nesting complexity (to some degree) with
code complexity.
+ - {X2Go/Server/Agent/NX/Options.pm,
+ x2goserver/bin/x2goupdateoptionsstring}: fix/silence a few Perl::Critic
+ warnings.
* debian/control:
+ Build-depend upon lsb-release for distro version detection.
* debian/x2goserver.manpages:
diff --git a/x2goserver/bin/x2goupdateoptionsstring b/x2goserver/bin/x2goupdateoptionsstring
index 689f75c9..b248add8 100755
--- a/x2goserver/bin/x2goupdateoptionsstring
+++ b/x2goserver/bin/x2goupdateoptionsstring
@@ -255,7 +255,7 @@ sub handle_mode {
my %modes = ();
foreach my $elem (MODES) {
- $modes{(&$elem())[0]} = 1;
+ $modes{(&{$elem}())[0]} = 1;
}
my $abbrev_ret = handle_mode_abbrev ($mode);
@@ -288,7 +288,7 @@ sub handle_mode {
# Now check if value matches a known one.
if ((!($error_detected)) && (!($found))) {
foreach my $elem (MODES) {
- if (exists ($modes{(&$elem())[0]})) {
+ if (exists ($modes{(&{$elem}())[0]})) {
$mode_parse = $elem;
$found = 1;
last;
@@ -311,7 +311,7 @@ sub handle_mode {
# Okay, now check for mutual exclusiveness and map to return value.
if (!($error_detected)) {
- $ret = ($mode_aggregate | (&$mode_parse())[1]);
+ $ret = ($mode_aggregate | (&{$mode_parse}())[1]);
if (($ret) && ($ret & ($ret - 1))) {
print {*STDERR} "Mutually exclusive modes specified, erroring out.\n";
@@ -563,8 +563,8 @@ x2goupdateoptionsstring - X2Go Agent Options String Manipulator
=head1 DESCRIPTION
=for comment
-Due to parser oddities, breaking a line during an L<> formatter code right
-after the separating pipe character will generate broken links.
+Due to parser oddities, breaking a line during an L<dummy|text> formatter code
+right after the separating pipe character will generate broken links.
Make sure to only break it during the description or, generally, on space
characters.
A workaround for this as been proposed in
@@ -695,6 +695,6 @@ C<x2goupdateoptionsstring '-c' '--'
This manual has been written by
Mihai Moldovan L<E<lt>ionic at ionic.deE<gt>|mailto:ionic at ionic.de> for the X2Go
-project (L<https://www.x2go.org>).
+project (L<https://www.x2go.org|https://www.x2go.org>).
=cut
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
More information about the x2go-commits
mailing list