Re: libwww-perl-5b8
Nick Ing-Simmons (nik@tiuk.ti.com)
Tue, 27 Feb 96 13:33:52 GMT
In <9602271228.AA21571@pluto>
On Tue, 27 Feb 96 12:28:25 GMT
Nick Ing-Simmons <nik@tiuk.ti.com> writes:
>
>It didn't, does now.
>Mis-install - hit default "install_site" but had done install_perl
>of 5b7 so found that 1st.
>
Snags :
Can't locate auto/URI/URL/file/DESTROY.al in @INC at tkweb line 55
Normal AutoLoader trick is dummy DESTROY in base class.
Use of uninitialized value at /usr/local/lib/perl5.new/auto/LWP/UserAgent/proxy.al line 8.
Use of uninitialized value at /usr/local/lib/perl5.new/auto/LWP/UserAgent/proxy.al line 11.
Use of uninitialized value at /usr/local/lib/perl5.new/auto/LWP/UserAgent/proxy.al line 12.
setenv | grep proxy
ftp_proxy=http://wwwmos.tiuk.ti.com/
gopher_proxy=http://wwwmos.tiuk.ti.com/
http_proxy=http://wwwmos.tiuk.ti.com/
no_proxy=localhost,tiuk.ti.com
Probable cause is env_proxy has :
$self->proxy($1, $v);
But $1 will get clobbered by AutoLoader::AUTOLOAD when proxy is
autoloaded. I have fixed similar problems by copying $1 into
my variable before calling methods that may not be loaded yet.
I have appended patches which seem to work.
Now a problem which I had with 5b7 too:
Is this (cut down) approach valid:
#!/usr/local/bin/perl -w
use LWP;
@ARGV = __FILE__ unless (@ARGV);
my $url = URI::URL->new($ARGV[0],URI::URL->newlocal);
$url = $url->abs;
my $sec = URI::URL->new("#Section0",$url);
print $sec->as_string,"\n";
# This fails:
my $abs = $sec->abs;
print $abs->as_string,"\n";
__END__
Illegal method for file URLs at /usr/local/lib/perl5.new/auto/URI/URL/_generic/abs.al line 39
Other than those looks good so far...
# Patches:
*** ./lib/LWP/UserAgent.pm% Tue Feb 27 13:13:45 1996
--- ./lib/LWP/UserAgent.pm Tue Feb 27 13:13:45 1996
***************
*** 559,569 ****
while(($k, $v) = each %ENV) {
$k = lc($k);
next unless $k =~ /^(.*)_proxy$/;
! if ($1 eq 'no') {
$self->no_proxy(split(/\s*,\s*/, $v));
}
else {
! $self->proxy($1, $v);
}
}
}
--- 559,570 ----
while(($k, $v) = each %ENV) {
$k = lc($k);
next unless $k =~ /^(.*)_proxy$/;
! $k = $1;
! if ($k eq 'no') {
$self->no_proxy(split(/\s*,\s*/, $v));
}
else {
! $self->proxy($k, $v);
}
}
}
*** ./lib/URI/URL.pm% Tue Feb 27 13:15:03 1996
--- ./lib/URI/URL.pm Tue Feb 27 13:15:03 1996
***************
*** 192,197 ****
--- 192,203 ----
$old;
}
+ # Don't need DESTROY but avoid trying to AUTOLOAD it.
+ sub DESTROY
+ {
+
+ }
+
#
# A U T O L O A D I N G