-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
syntax error at /usr/sbin/spampd line 1386, near "}{" #30
Comments
Here is a second issue which I worked around by commenting out:
|
And this one also:
|
Hi Simon! For the first one, please try replacing line 1386 with: my $v = $opts->{$k}; Not sure why I even used the other more obscure syntax in the first place. Indeed, 5.16 is a bit dated... (though not as dated as spampd) :-) 5.28.1 is what I was mostly testing with... which is from 2018.
This is coming from
Is that an error or warning? I do vaguely remember those settings gave me some grief, but I'm not getting any errors or warnings now. I'll check their docs for clues. IIRC this should only affect the Thanks for trying it and reporting! |
Hi Maxim,
Thanks for the quick reply.
For the first one, please try replacing line 1386 with:
```perl
my $v = $opts->{$k};
```
Not sure why I even used the other more obscure syntax in the first place.
It works well this way!
Indeed, 5.16 is a bit dated... (though not as dated as spampd) :-) 5.28.1
is what I was mostly testing with... which is from 2018.
> Error in option spec: "hh|??:s"
On one of my test hosts it looks like it doesn't like multiple ?? in the
definition. Simply removing them seems to do it:
'help|h|?:s' => sub { $self->usage(0, 1, $_[1]); },
'hh:s' => sub { $self->usage(0, 2, $_[1]); },
'hhh:s' => sub { $self->usage(0, 3, $_[1]); },
'hhhh|man:s' => sub { $self->usage(0, 4, $_[1]); },
'version|vers' => sub { $self->version(); },
> Name "Data::Dumper::Sparseseen" used only once: possible typo at
> /usr/sbin/spampd line 1429.
Is that an error or warning? I do vaguely remember those settings gave me
Tested it on two hosts and on the older one, it send these errors to
STDERR when starting up.
Is there a way to silence the 4 messages created on lines 1428+1429? Sorry
I don't know perl enough but I thought analog to doing the commands in a
shell with added 2> /dev/null.
Thanks,
Simon
|
Cool! I've got that queued up for an update.
Interesting... I guess I could just remove that syntax. Or make it Perl version dependent? It's always the small stuff!
I'm not sure... probably but I probably need to recreate it. I wish I could remember better now what my issue with those variables was before. I'm not even sure where exactly the messages are coming from at the moment. But just to clarify, it runs OK, "just" with those annoying messages to stderr? And they appear even when not using any of the Thanks! |
> It works well this way!
Cool! I've got that queued up for an update.
> On one of my test hosts it looks like it doesn't like multiple ?? in the
> definition.
Interesting... I guess I could just remove that syntax. Or make it Perl
version dependent? It's always the small stuff!
> Is there a way to silence the 4 messages created on lines 1428+1429?
I'm not sure... probably but I probably need to recreate it. I wish I
could remember better now what my issue with those variables was before.
I'm not even sure where exactly the messages are coming from at the
moment.
But just to clarify, it runs OK, "just" with those annoying messages to
stderr? And they appear even when not using any of the `--show` options?
The output seems to be limited to older versions while newer versions
don't show them anymore. And yes, those messages appear on startup without
any `--show` option. Spmapd seems to start normally I didn't actually test
with messages going trough.
Simon
|
But just to clarify, it runs OK, "just" with those annoying messages to
stderr? And they appear even when not using any of the `--show` options?
Without knowing what I do exactly I've changed it like this:
`
use Data::Dumper;
$Data::Dumper::Quotekeys = 0;
$Data::Dumper::Bless = '';
$Data::Dumper::Sortkeys = 1;
$Data::Dumper::Sparseseen = 1;
`
Now I only get this line:
Name "Data::Dumper::Sparseseen" used only once: possible typo at ./spampd
line 1431.
And it seems to be because `Sparseseen` is not know to this Dumper version.
I have no idea why the require vs. use matters :)
Simon
|
Hi Simon, does it help to just add
I couldn't find any mention or record of |
Could you try replacing from line 574 with the following? if (!$self->is_reloading()) {
my ($q2, $q3, $q4) = ("|??", "|???", "|????");
$q2 = $q3 = $q4 = "" if ($Getopt::Long::VERSION < 2.5);
%options = (
%options,
'show=s@' => \$spd_p->{show_dbg},
'help|h|?:s' => sub { $self->usage(0, 1, $_[1]); },
'hh'.$q2.':s' => sub { $self->usage(0, 2, $_[1]); },
'hhh'.$q3.':s' => sub { $self->usage(0, 3, $_[1]); },
'hhhh'.$q4.'|man:s' => sub { $self->usage(0, 4, $_[1]); },
'version|vers' => sub { $self->version(); },
);
} The version number is a bit of a guess but that's what I have installed and I know it works. I only see one relevant commit on this matter (sciurius/perl-Getopt-Long@0a8e314) but looks like it didn't make it until v2.51, so I'm not sure why it works with my v2.50. Thanks! |
Hi Maxim, The
For the other issue with --??, it still doesn't work.
Thanks, |
My current patch for the -?? issue looks like this:
|
Hi Simon, Great on the silenced warnings, another one solved. Agreed about
That's what my patch also does, essentially (removes the multi-
If that means those options don't do anything on the command line, that would be correct (same as your patch). As long as the program runs w/out errors. Unfortunately I don't know how to update the POD docs (and help text) dynamically as well! Probably not reasonably possible. I'm actually trying to recreate the issue with
Thanks, |
Never mind... narrowed it down to v2.38... 2.39 works and sure enough there's a 10 yr old change there. sciurius/perl-Getopt-Long@ba1194f |
Hi,
I've tried to update my spampd packages to 2.60 but got this error on RHEL7:
Commenting out the offending lines makes it start up:
Maybe this is because perl is too old (perl-5.16.3)?
Do you have an idea how to make this work here?
Thank you from a long time spampd user,
Simon
The text was updated successfully, but these errors were encountered: