pullnews and Net:NNTP

Julien ÉLIE julien at trigofacile.com
Mon Apr 28 08:39:59 UTC 2008


pullnews is currently redefining Net::NNTP::new because it used to call
the $obj->reader() function which issued "MODE READER".

However, that behaviour changed in 1998 with libnet-1.0606:

    Change 100 on 1998/01/23 by <gbarr at pobox.com> (Graham Barr)

     - Added Reader option to new()

There is now "unless(exists $arg{Reader} && $arg{Reader} == 0)" before
the call to $obj->reader().

Therefore, I believe it is now safe to remove the redefinition of Net::NNTP::new
in pullnews (and to turn warnings one at last).

Please tell me in case I should not remove it.

I can even do:

-    my %localopts = ("Port" => "$localPort");
+    my %localopts = ("Port" => "$localPort", "Reader" => 0);
    $localcxn = Net::NNTP->new($localServer, %localopts) ||
        die "can't connect to server $localServer\n" ;

but it is not necessary.

For the anecdote, I wrote to Graham Barr because of his libnet man page:

    B<Reader> - If the remote server is INN then initially the connection
    will be to nnrpd, by default C<Net::NNTP> will issue a C<MODE READER> command
    so that the remote server becomes innd. If the C<Reader> option is given
    with a value of zero, then this command will not be sent and the
    connection will be left talking to nnrpd.

It is not the default behaviour of Net::NNTP.  Besides, there is a confusion
between innd and nnrpd.

Julien ÉLIE

« L'angle droit bout à 90 degrés. »

More information about the inn-workers mailing list