On 6 Jul 2005, at 16:51, Charlie Brady wrote:
Thoughts?
I'd rather just eval those subs into existence than need another CPAN module to do something so easy.
Something like:
BEGIN {
my @fields = qw( remote_host remote_ip remote_info remote_port
local_ip local_port
relay_client hello hello_host)
);
foreach my $f (@fields) {
eval 'sub ' . $f . ' { my $self = shift;
@_ and $self->{_' . $f . '} = shift;
$self->{_' . $f . '};
}';
}
}
