+libnet 1.19 -- Wed Jun 30 14:53:48 BST 2004
+
+Bug Fixes
+ * Fixed datasend test to work on Win32 platform
+ * Fixed Authen::SASL checking in SMTP.pm and POP3.pm
+ * Fixed bug that a restarted get with Net::FTP did not append to local file
+
libnet 1.18 -- Mon Mar 22 16:19:01 GMT 2004
Bug Fixes
}
}
-$VERSION = "2.25";
+$VERSION = "2.26";
@ISA = qw(Exporter);
@EXPORT = qw(CMD_INFO CMD_OK CMD_MORE CMD_REJECT CMD_ERROR CMD_PENDING);
while($len)
{
my $wout;
- if (select(undef,$wout=$win, undef, $timeout) > 0)
+ if (select(undef,$wout=$win, undef, $timeout) > 0 or -f $cmd) # -f for testing on win32
{
my $w = syswrite($cmd, $line, $len, $offset);
unless (defined($w))
# Net::FTP.pm
#
-# Copyright (c) 1995-2003 Graham Barr <gbarr@pobox.com>. All rights reserved.
+# Copyright (c) 1995-2004 Graham Barr <gbarr@pobox.com>. All rights reserved.
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
use Fcntl qw(O_WRONLY O_RDONLY O_APPEND O_CREAT O_TRUNC);
# use AutoLoader qw(AUTOLOAD);
-$VERSION = "2.74"; # $Id: //depot/libnet/Net/FTP.pm#84 $
+$VERSION = "2.75";
@ISA = qw(Exporter Net::Cmd IO::Socket::INET);
# Someday I will "use constant", when I am not bothered to much about
if $remote =~ /[\r\n]/s;
${*$ftp}{'net_ftp_rest'} = $where if defined $where;
+ my $rest = ${*$ftp}{'net_ftp_rest'};
delete ${*$ftp}{'net_ftp_port'};
delete ${*$ftp}{'net_ftp_pasv'};
{
$loc = \*FD;
- unless(sysopen($loc, $local, O_CREAT | O_WRONLY | (${*$ftp}{'net_ftp_rest'} ? O_APPEND : O_TRUNC)))
+ unless(sysopen($loc, $local, O_CREAT | O_WRONLY | ($rest ? O_APPEND : O_TRUNC)))
{
carp "Cannot open Local file $local: $!\n";
$data->abort;
=head1 COPYRIGHT
-Copyright (c) 1995-2003 Graham Barr. All rights reserved.
+Copyright (c) 1995-2004 Graham Barr. All rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
use Carp;
use Net::Config;
-$VERSION = "2.27";
+$VERSION = "2.28";
@ISA = qw(Net::Cmd IO::Socket::INET);
eval {
require MIME::Base64;
require Authen::SASL;
- } or return $self->set_error(500,["Need MIME::Base64 and Authen::SASL todo auth"]);
+ } or $self->set_status(500,["Need MIME::Base64 and Authen::SASL todo auth"]), return 0;
my $capa = $self->capa;
my $mechanisms = $capa->{SASL} || 'CRAM-MD5';
use Net::Cmd;
use Net::Config;
-$VERSION = "2.28";
+$VERSION = "2.29";
@ISA = qw(Net::Cmd IO::Socket::INET);
sub auth {
my ($self, $username, $password) = @_;
- require MIME::Base64;
- require Authen::SASL;
+ eval {
+ require MIME::Base64;
+ require Authen::SASL;
+ } or $self->set_status(500,["Need MIME::Base64 and Authen::SASL todo auth"]), return 0;
my $mechanisms = $self->supports('AUTH',500,["Command unknown: 'AUTH'"]);
return unless defined $mechanisms;
(my $libnet_t = __FILE__) =~ s/datasend.t/libnet_t.pl/;
require $libnet_t or die;
-print "1..15\n";
+print "1..51\n";
sub check {
my $expect = pop;
my $cmd = Foo->new;
- $cmd->datasend unless @_;
+ ok($cmd->datasend, 'datasend') unless @_;
foreach my $line (@_) {
- $cmd->datasend($line);
+ ok($cmd->datasend($line), 'datasend');
}
- $cmd->dataend;
- is($cmd->output, $expect);
+ ok($cmd->dataend, 'dataend');
+ is(
+ unpack("H*",$cmd->output),
+ unpack("H*",$expect)
+ );
}
my $cmd;