From e1785b1923b09866d34efb0a0eda16d4330cf1eb Mon Sep 17 00:00:00 2001 From: Robert Spier Date: Sun, 29 Aug 2004 07:53:15 +0000 Subject: [PATCH] More accessors git-svn-id: https://svn.perl.org/qpsmtpd/trunk@290 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd/Connection.pm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/Qpsmtpd/Connection.pm b/lib/Qpsmtpd/Connection.pm index 569cf76..ea6ec07 100644 --- a/lib/Qpsmtpd/Connection.pm +++ b/lib/Qpsmtpd/Connection.pm @@ -14,7 +14,8 @@ sub start { my %args = @_; - for my $f (qw(remote_host remote_ip remote_info)) { + for my $f (qw(remote_host remote_ip remote_info remote_port + local_ip local_port)) { $self->$f($args{$f}) if $args{$f}; } @@ -33,6 +34,25 @@ sub remote_ip { $self->{_remote_ip}; } +sub remote_port { + my $self = shift; + @_ and $self->{_remote_port} = shift; + $self->{_remote_port}; +} + +sub local_ip { + my $self = shift; + @_ and $self->{_local_ip} = shift; + $self->{_local_ip}; +} + +sub local_port { + my $self = shift; + @_ and $self->{_local_port} = shift; + $self->{_local_port}; +} + + sub remote_info { my $self = shift; @_ and $self->{_remote_info} = shift;