diff options
| author | fukachan <fukachan> | 2006-03-26 14:58:08 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2006-03-26 14:58:08 +0000 |
| commit | 7dc46fcf33231e4d030e321ebf2f551690766df2 (patch) | |
| tree | 1e57781770d2f03a4381f0637d48bdac2cb62bdf /fml/lib/Mail/Delivery | |
| parent | 1ec41964df136ca850e388b3987e71f3fe1c58e6 (diff) | |
| download | fml8-7dc46fcf33231e4d030e321ebf2f551690766df2.tar.gz fml8-7dc46fcf33231e4d030e321ebf2f551690766df2.tar.bz2 fml8-7dc46fcf33231e4d030e321ebf2f551690766df2.zip | |
fix arguments:
+ connect{4,6}() accepts $mta.
+ remove not used arguments.
Diffstat (limited to 'fml/lib/Mail/Delivery')
| -rw-r--r-- | fml/lib/Mail/Delivery/Net/INET4.pm | 7 | ||||
| -rw-r--r-- | fml/lib/Mail/Delivery/Net/INET6.pm | 31 |
2 files changed, 18 insertions, 20 deletions
diff --git a/fml/lib/Mail/Delivery/Net/INET4.pm b/fml/lib/Mail/Delivery/Net/INET4.pm index c24e7961..3deb6127 100644 --- a/fml/lib/Mail/Delivery/Net/INET4.pm +++ b/fml/lib/Mail/Delivery/Net/INET4.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: INET4.pm,v 1.11 2005/05/27 01:22:27 fukachan Exp $ +# $FML: INET4.pm,v 1.12 2006/03/24 14:16:38 fukachan Exp $ # package Mail::Delivery::Net::INET4; @@ -18,13 +18,12 @@ require Exporter; # Descriptions: try connect(2) by IPv4. -# Arguments: OBJ($self) HASH_REF($args) +# Arguments: OBJ($self) STR($mta) # Side Effects: create ipv4 smtp connection # Return Value: HANDLE sub connect4 { - my ($self, $args) = @_; - my $mta = $args->{ mta }; + my ($self, $mta) = @_; my $socket = undef; # ASSERT diff --git a/fml/lib/Mail/Delivery/Net/INET6.pm b/fml/lib/Mail/Delivery/Net/INET6.pm index 998fc904..f7da232b 100644 --- a/fml/lib/Mail/Delivery/Net/INET6.pm +++ b/fml/lib/Mail/Delivery/Net/INET6.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: INET6.pm,v 1.16 2005/05/27 03:03:41 fukachan Exp $ +# $FML: INET6.pm,v 1.17 2006/03/24 14:09:58 fukachan Exp $ # package Mail::Delivery::Net::INET6; @@ -26,12 +26,12 @@ require Exporter; # Descriptions: we have Socket6.pm or not ? -# Arguments: OBJ($self) HASH_REF($args) +# Arguments: OBJ($self) # Side Effects: none # Return Value: none sub check_ipv6_module_available { - my ($self, $args) = @_; + my ($self) = @_; eval q{ use Socket; @@ -49,16 +49,16 @@ sub check_ipv6_module_available # Descriptions: This host supports IPv6 ? -# Arguments: OBJ($self) HASH_REF($args) +# Arguments: OBJ($self) # Side Effects: none # Return Value: NUM (1 or 0) sub is_ipv6_ready { - my ($self, $args) = @_; + my ($self) = @_; # probe the IPv6 availability for the first time unless ($self->get_ipv6_ready()) { - $self->check_ipv6_module_available($args); + $self->check_ipv6_module_available(); }; my $status = $self->get_ipv6_ready() || 'no'; @@ -94,19 +94,19 @@ sub get_ipv6_ready } -# Descriptions: $host is IPv6 syntax ? -# return (host, port) if IPv6 native format -# Arguments: OBJ($self) STR($host) +# Descriptions: check if $mta is IPv6 syntax ? +# return (host, port) if $mta is a IPv6 native format. +# Arguments: OBJ($self) STR($mta) # Side Effects: none # Return Value: ARRAY(host, port) sub is_ipv6_mta_syntax { - my ($self, $host) = @_; + my ($self, $mta) = @_; # check the mta syntax whether it is ipv6 form or not. - if ($host =~ /\[([\d:]+)\]:(\d+)/) { - my ($x_host, $x_port) = ($1, $2); - return ($x_host, $x_port); + if ($mta =~ /\[([\d:]+)\]:(\d+)/) { + my ($host, $port) = ($1, $2); + return ($host, $port); } else { return wantarray ? () : undef; @@ -132,13 +132,12 @@ sub _parse_mta # Descriptions: try connect(2) by IPv6. -# Arguments: OBJ($self) HASH_REF($args) +# Arguments: OBJ($self) STR($mta) # Side Effects: create IPv6 smtp connection # Return Value: none sub connect6 { - my ($self, $args) = @_; - my $mta = $args->{ mta }; + my ($self, $mta) = @_; # check the mta syntax is $ipv6_addr:$port or not. my ($host, $port) = $self->is_ipv6_mta_syntax($mta); |
