Subject: | Namespace pollution: LWP fails to clean up |
When you run the following perl script,
use Data::Dumper;
use LWP::Simple;
get('http://example.com');
print Dumper(\%Symbol::GEN0);
you will get this output:
$VAR1 = {
'io_socket_type' => 1,
'io_socket_proto' => 6,
'io_socket_domain' => 2,
'io_socket_timeout' => 60
};
I think this is because in Net::HTTP::Methods, all the private data are
stored in %{*$self}, but in the end, nobody cleans them up, so they
linger around and consume memory. Probably one should have a DESTROY
method wipe out %{*$self}.
If a long-running program makes heavy use of LWP, it will probably have
many unneeded data in its memory at some time.
Regards, Christoph
$ perl -v
This is perl, v5.8.7 built for i386-linux