Mailing List Archive

Patch for 5.001n Socket.pm to avoid -w typo warnings!
Subject says it all.

I've also made a couple of trivial efficiency tweaks.

Tim.

diff -c2 ./ext/Socket/Socket.pm.1n ./ext/Socket/Socket.pm
*** ./ext/Socket/Socket.pm.1n Fri Nov 10 23:58:22 1995
--- ./ext/Socket/Socket.pm Fri Nov 10 23:58:28 1995
***************
*** 173,179 ****

sub AUTOLOAD {
! local($constname);
($constname = $AUTOLOAD) =~ s/.*:://;
! $val = constant($constname, @_ ? $_[0] : 0);
if ($! != 0) {
if ($! =~ /Invalid/) {
--- 173,179 ----

sub AUTOLOAD {
! my $constname;
($constname = $AUTOLOAD) =~ s/.*:://;
! my $val = constant($constname, 0);
if ($! != 0) {
if ($! =~ /Invalid/) {
***************
*** 182,186 ****
}
else {
- ($pack,$file,$line) = caller;
croak "Your vendor has not defined Socket macro $constname, used";
}
--- 182,185 ----
Re: Patch for 5.001n Socket.pm to avoid -w typo warnings! [ In reply to ]
i need to make arg checks, and i have a fixed socket.t for the testlib.

--tom