๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #83686

Re: Undefined $user in filter_nnrpd.pl?

#83686
From: Michael Grimm
Date: Wed, 17 Nov 2010 19:15
31 lines
2424 bytes
Ralf Dรถblitz <doeblitz@doeblitz.net> wrote:
> Michael Grimm <trashcan@odo.in-berlin.de> wrote:

>> 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 ;-)
>
> Ahemm, if you use "use strict" you have to declare all variables that
> you use. So you should expand
>| our (%hdr, $modify_headers);
> to
>| our (%hdr, $modify_headers, $user);
> and your perl script will not complain about that variable anymore.

Thanks for your clarification. Now, I do understand, and, yes, that
script doesn't complain any longer.

Regards,
Michael
-- 
to let
Technical Details
Message-ID: <ic19kg$1pg5$2@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.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.musoftware.de!wum.musoftware.de!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> <ibrplq$nv0$5@de-l.enfer-du-nord.net> <ibtbif$835$1@selene.doeblitz.net>

Show Full Headers
Complete Article Headers
Message-ID: <ic19kg$1pg5$2@de-l.enfer-du-nord.net>
Subject: Re: Undefined $user in filter_nnrpd.pl?
Date: Wed, 17 Nov 2010 19:15:28 +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> <ibrplq$nv0$5@de-l.enfer-du-nord.net> <ibtbif$835$1@selene.doeblitz.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.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.musoftware.de!wum.musoftware.de!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!reader.enfer-du-nord.net!.POSTED!not-for-mail
Newsgroups: news.software.nntp
Organization: ATK - Alternative Tierklinik links der Einfalt
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: 8bit
Injection-Info: reader.enfer-du-nord.net;
 posting-host="U2FsdGVkX1++kuAFrn1ODVOGCJ7sIuahQ8vsDCo6F98=";
 mail-complaints-to="abuse@enfer-du-nord.net"
User-Agent: slrn/pre1.0.0-15/mm/ao (Darwin)
Cancel-Lock: sha1:CL+cdjX3aotq8GM/J+d9RwnwhI8=
 sha1:HddncnMDKgi4DHNtNC5xNs0OCZY=
Mail-Copies-To: nobody
Lines: 30
X-Original-Bytes: 2221