Sync with libnet 1.14
[p5sagit/p5-mst-13.2.git] / lib / Net / NNTP.pm
index 0076405..79261f8 100644 (file)
@@ -14,7 +14,7 @@ use Carp;
 use Time::Local;
 use Net::Config;
 
-$VERSION = "2.21"; # $Id: //depot/libnet/Net/NNTP.pm#15 $
+$VERSION = "2.22"; # $Id: //depot/libnet/Net/NNTP.pm#18 $
 @ISA     = qw(Net::Cmd IO::Socket::INET);
 
 sub new
@@ -87,7 +87,7 @@ sub debug_text
  my $inout = shift;
  my $text = shift;
 
- if(($nntp->code == 350 && $text =~ /^(\S+)/)
+ if((ref($nntp) and $nntp->code == 350 and $text =~ /^(\S+)/)
     || ($text =~ /^(authinfo\s+pass)/io)) 
   {
    $text = "$1 ....\n"
@@ -882,6 +882,10 @@ C<datasend> and C<dataend> methods from L<Net::Cmd>
 
 C<MESSAGE> can be either an array of lines or a reference to an array.
 
+The message, either sent via C<datasend> or as the C<MESSAGE>
+parameter, must be in the format as described by RFC822 and must
+contain From:, Newsgroups: and Subject: headers.
+
 =item postfh ()
 
 Post a new article to the news server using a tied filehandle.  If
@@ -1113,6 +1117,6 @@ it under the same terms as Perl itself.
 
 =for html <hr>
 
-I<$Id: //depot/libnet/Net/NNTP.pm#15 $>
+I<$Id: //depot/libnet/Net/NNTP.pm#18 $>
 
 =cut