Re: problams with IO::Socket::INET
Graham Barr (gbarr@ti.com)
Tue, 27 Jan 1998 17:06:42 -0600
Tom Christiansen wrote:
>
> >> $sock = new IO::Socket::INET (PeerHost => "localhost",
>
> >That should be PeerAddr not PeerHost
>
> Why doesn't it give an error message on wrong arguments!?
Well the original answer to that question was inheritance. ie
someone could do
package A;
@ISA = qw(IO::Socket::INET);
sub new {
my $p = shift;
my $sock = $p->SUPER::new(@_);
# now pick my args from @_
}
This means that package A would not need to know *all* of
the arguments that IO::Socket::INET supports, or need modifications
when IO::Socket::INET has new options added.
Now on the other hand I do not know of anyone who uses it
in this way, so I could change IO::Socket::INET to croak
on illegal arguments, but if someone complains then I
may have to change it back.
Graham.
--
Originality is the ability to conceal your source.