🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #83678

Re: Undefined $user in filter_nnrpd.pl?

#83678
From: Michael Grimm
Date: Mon, 15 Nov 2010 17:12
43 lines
2757 bytes
Thomas Hochstein <thh@inter.net> wrote:
> Michael Grimm schrieb:
>> Thomas Hochstein <thh@inter.net> wrote:
>>> Michael Grimm schrieb:

>>>> But, whenever I access the variable $user in filter_nnrpd.pl's filter_post
>>>> subroutine, I'll end up in:
>>>> ,----
>>>>| nnrpd[123]: Perl function filter_post died: Undefined subroutine &main::filter_post called.
>>>>| nnrpd[123]: SERVER perl filtering disabled
>>>> `----
>>> Strange.
>
> To elaborate on that: even an undefinied $user shouldn't lead to
> &filter_post being undefined!
>
>>> Could you show us the relevant parts of your filter_nnrpd.pl,
>>> anonymized as necessary?
>
> So that was the reason for my request.

Well, I did reduce my filter_nnrpd.pl to ...
,----
| use strict;
| our (%hdr, $modify_headers);
| sub filter_post {
| 	my $rval = '';
|    	$modify_headers = 1;
| 	INN::syslog('notice',"DEBUG(user): ".$user);
| 	return $rval;
| }
`----
... and it triggered the error message as cited above. But, when I do
remove the "use strict;", well, then the filter works as expected ;-)

Hmm. I'm not that much an expert in Perl, thus I don't understand it.

Anyway, thanks to both of you in helping me to debug my issue here.

Regards,
Michael
-- 
to let
Technical Details
Message-ID: <ibrplq$nv0$5@de-l.enfer-du-nord.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news3.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!reader.enfer-du-nord.net!.POSTED!not-for-mail
References: <ibosfc$24e$1@de-l.enfer-du-nord.net> <nsn.1011141928.3607@thorondor.akallabeth.de> <ibph2a$1ejh$2@de-l.enfer-du-nord.net> <nsn.1011150851.3613@thorondor.akallabeth.de>

Show Full Headers
Complete Article Headers
Message-ID: <ibrplq$nv0$5@de-l.enfer-du-nord.net>
Subject: Re: Undefined $user in filter_nnrpd.pl?
Date: Mon, 15 Nov 2010 17:12:26 +0000
From: Michael Grimm <trashcan@odo.in-berlin.de>
References: <ibosfc$24e$1@de-l.enfer-du-nord.net> <nsn.1011141928.3607@thorondor.akallabeth.de> <ibph2a$1ejh$2@de-l.enfer-du-nord.net> <nsn.1011150851.3613@thorondor.akallabeth.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news3.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!reader.enfer-du-nord.net!.POSTED!not-for-mail
Newsgroups: news.software.nntp
Supersedes: <ibrpks$nv0$4@de-l.enfer-du-nord.net>
Organization: ATK - Alternative Tierklinik links der Einfalt
Injection-Info: reader.enfer-du-nord.net;
 posting-host="U2FsdGVkX1+kv+JE40oJ4yCInNAPWSHeclDbb2rkrQo=";
 mail-complaints-to="abuse@enfer-du-nord.net"
User-Agent: slrn/pre1.0.0-15/mm/ao (Darwin)
Cancel-Key: sha1:kDqBM5zlI7fm6uyiHZAHzEsictQ= sha1:Fut6I3+yh7yrsjSrC2YgLmYZ4ek=
X-Superseded-Date: Mon, 15 Nov 2010 17:11:56 +0000 (UTC)
Cancel-Lock: sha1:xl/ynhkv8O2LvUIsELSdlkLKD0o=
 sha1:Yb+kISFhgH95PSi+s6/rumYw+Uc=
Lines: 42
X-Original-Bytes: 2554