my $call = $self->{call};
for (@_) {
- chomp;
+# chomp;
my @lines = split /\n/;
for (@lines) {
$conn->send_now("$sort$call|$_");
my $call = $self->{call};
for (@_) {
- chomp;
+# chomp;
my @lines = split /\n/;
for (@lines) {
$conn->send_later("D$call|$_");
$name =~ s/.*:://o;
confess "Non-existant field '$AUTOLOAD'" if !$valid{$name};
- @_ ? $self->{$name} = shift : $self->{$name} ;
+
+ # this clever line of code creates a subroutine which takes over from autoload
+ # from OO Perl - Conway
+ *{$AUTOLOAD} = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}} ;
+ @_ ? $self->{$name} = shift : $self->{$name} ;
}
+
1;
__END__;