4 |
use strict; |
use strict; |
5 |
|
|
6 |
use IO::Socket::INET; |
use IO::Socket::INET; |
7 |
use Data::Dump qw/dump/; |
use Data::Dumper; |
8 |
use Carp qw/confess/; |
use Carp qw/confess/; |
9 |
|
|
10 |
=head1 NAME |
=head1 NAME |
75 |
my $command = $AUTOLOAD; |
my $command = $AUTOLOAD; |
76 |
$command =~ s/.*://; |
$command =~ s/.*://; |
77 |
|
|
78 |
warn "## $command ",dump(@_) if $self->{debug}; |
warn "## $command ",Dumper(@_) if $self->{debug}; |
79 |
|
|
80 |
my $send; |
my $send; |
81 |
|
|
147 |
my $v; |
my $v; |
148 |
if ( $len > 0 ) { |
if ( $len > 0 ) { |
149 |
read($self->{sock}, $v, $len) || die $!; |
read($self->{sock}, $v, $len) || die $!; |
150 |
warn "<< ",dump($v),$/ if $self->{debug}; |
warn "<< ",Dumper($v),$/ if $self->{debug}; |
151 |
} |
} |
152 |
my $crlf; |
my $crlf; |
153 |
read($self->{sock}, $crlf, 2); # skip cr/lf |
read($self->{sock}, $crlf, 2); # skip cr/lf |
166 |
$list[ $_ ] = $self->__read_bulk( substr(<$sock>,1,-2) ); |
$list[ $_ ] = $self->__read_bulk( substr(<$sock>,1,-2) ); |
167 |
} |
} |
168 |
|
|
169 |
warn "## list = ", dump( @list ) if $self->{debug}; |
warn "## list = ", Dumper( @list ) if $self->{debug}; |
170 |
return @list; |
return @list; |
171 |
} |
} |
172 |
|
|