Net::NNTP Posting problem 
Author Message
 Net::NNTP Posting problem

Still experimenting around with the Net::NNTP module.
 I AM able to connect to a server and read messages :), but I can't
post. :(

Does anyone have any sample code that will explain what I need to do?

I have included the code that I'm using below.

When I run the program, this is what I get:


therefore I can post!!!
Can't post:

Thank you very much,
Mark Cervarich

<---- cut here ---->

#!/usr/local/bin/perl

use Net::NNTP;

$server = Net::NNTP->new("news1.alterdial.uu.net")

$server->postok()
   or warn "Server didn't tell me I could post.\n";

print "therefore I can post!!!\n";












   or die "Can't post: $!\n";

print "after post, server is $server\n";

<---- end code fragment----->



Sat, 21 Apr 2001 03:00:00 GMT  
 Net::NNTP Posting problem

Quote:


>    or die "Can't post: $!\n";

You don't want to use $! to tell what went wrong here. Instead, since
Net::NNTP inherits from Net::Cmd, use the latter's methods to find out
what went wrong. If needed, turn on debugging mode and see what the actual
transaction is doing. Good luck!

--
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



Sun, 22 Apr 2001 03:00:00 GMT  
 Net::NNTP Posting problem

: Still experimenting around with the Net::NNTP module.
:  I AM able to connect to a server and read messages :), but I can't
: post. :(

Please reply to the newsgroup, because I'd like to know the answer as well.



Sun, 22 Apr 2001 03:00:00 GMT  
 Net::NNTP Posting problem


Southwestern>    or die "Can't post: $!\n";

I'm not sure ->post knows what to do with a reference to a reference.
You might wanna unstack that a bit.

--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying

Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me



Sun, 22 Apr 2001 03:00:00 GMT  
 Net::NNTP Posting problem

Quote:



>Southwestern>    or die "Can't post: $!\n";

>I'm not sure ->post knows what to do with a reference to a reference.
>You might wanna unstack that a bit.

It's quite amazing what you can miss here. Being vaguely interested in using
this module someday, I scanned the message and ... completely missed that one!

--

Alastair




Mon, 23 Apr 2001 03:00:00 GMT  
 Net::NNTP Posting problem


Southwestern> or die "Can't post: $!\n";

Quote:
>> I'm not sure ->post knows what to do with a reference to a reference.
>> You might wanna unstack that a bit.

Alastair> It's quite amazing what you can miss here. Being vaguely
Alastair> interested in using this module someday, I scanned the
Alastair> message and ... completely missed that one!

It comes from years of practice reading llama-class student mistakes.
I read every little brace/paren/bracket when I'm reviewing code.  My
challenge is to find the error *just* as I'm coming around the
terminal to the screen.  I often can. :)

--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying

Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me



Mon, 23 Apr 2001 03:00:00 GMT  
 Net::NNTP Posting problem
Where might I locate an example of the type of script you used to successfully
connect to the server and read articles?  Thanks for any assistance.

Quote:


> : Still experimenting around with the Net::NNTP module.
> :  I AM able to connect to a server and read messages :), but I can't
> : post. :(

> Please reply to the newsgroup, because I'd like to know the answer as well.

--

 Ron Parker
 TradePoint LA / Tradewinds / SCBBS

 www.intl-trade.com
 www.tradepointla.org
 www.scbbs.com



Thu, 26 Apr 2001 03:00:00 GMT  
 Net::NNTP Posting problem

Quote:

> Where might I locate an example of the type of script you used to
> successfully connect to the server and read articles?

Have you seen the examples which come with the module's documentation? If
you find better examples than the ones which come with the module, please
inform the module's author. Hope this helps!

--
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



Thu, 26 Apr 2001 03:00:00 GMT  
 Net::NNTP Posting problem
I don't disagree.  I just don't know how to find these examples.  I tried
perldoc Net::NNTP which gives me all the commands, but no examples how to use
them.  I looked for nntp examples in the libwww-perl.5.6 package (which I
downloaded and installed to get the NNTP module), and could locate anything.
I searched the libnet-1.0605 directory tree and found only nntp, a demo which
has no comment fields to say anything about whats going on in it.

Perhaps there is a perldoc command to get me the examples -- if so, could you
tell me what that is?  If not, could you point me to the file/directory where
I might find the examples?  I'd really appreciate it.

Quote:


> > Where might I locate an example of the type of script you used to
> > successfully connect to the server and read articles?

> Have you seen the examples which come with the module's documentation? If
> you find better examples than the ones which come with the module, please
> inform the module's author. Hope this helps!

> --
> Tom Phoenix       Perl Training and Hacking       Esperanto
> Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/

--

 Ron Parker
 TradePoint LA / Tradewinds / SCBBS

 www.intl-trade.com
 www.tradepointla.org
 www.scbbs.com



Thu, 26 Apr 2001 03:00:00 GMT  
 Net::NNTP Posting problem

Quote:

>Where might I locate an example of the type of script you used to successfully
>connect to the server and read articles?  Thanks for any assistance.

You might want to switch to News::NNTPClient - the docs that comes
along with it are IMHO better, and the module is a bit easier to work
with.


Fri, 27 Apr 2001 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Problems posting with Net::NNTP

2. Help wanted- Problem posting with Net::NNTP

3. Net::NNTP - problem posting to newsgroups

4. Problems posting with Net::NNTP

5. Net::NNTP - problem posting to newsgroups

6. how to do a posting with Net::NNTP ?

7. Net::NNTP losing data when posting

8. NNTP.pm, Posting problem

9. Net::NNTP problem

10. Problem with postok() in NET::NNTP

11. Net:NNTP problem

12. NET::NNTP array problem

 

 
Powered by phpBB® Forum Software