develooper Front page | perl.libwww | Postings from April 2001

Clone method

Thread Next
From:
Ilya A. Tereshchenko
Date:
April 11, 2001 16:21
Subject:
Clone method
Message ID:
POEGLDAMBLNDEHIOLDHLAEJDCAAA.elliot@uic.nsu.ru
		Hello!
	It seems to me, that there is a bug in subj. Or, maybe, I understand the
copy term little different? I wrote small test program:

#!/usr/bin/perl

use strict;

use LWP::UserAgent;

my $ua = new LWP::UserAgent;
$ua->proxy('http', 'proxy:8000');
my $ub = new LWP::UserAgent;
my $uc = $ua->clone();
print "ua: ".$ua->proxy('http', 'aa')."\n";
print "ub: ".$ub->proxy('http', 'bb')."\n";
print "uc: ".$uc->proxy('http', 'cc')."\n";
print "ua: ".$ua->proxy('http', 'ee')."\n";

and was surprised receiving the next result:

ua: proxy:8000
ub:
uc: aa
ua: cc

I thought, it should returns something like

ua: proxy:8000
ub:
uc: proxy:8000
ua: aa

,should it?

Please, explain me is there a bug what should be fixed
or a feature what is a weight on my mind to no purpose.

PS: Redhat 7.0, libwww-perl-5.47.


			Best regards, Elliot.

----------------------------------------------------------------------------
-------------------
Ilya A. Tereshchenko
E-mail: elliot@uic.nsu.ru
For more information visit http://www.uic.nsu.ru/~elliot
----------------------------------------------------------------------------
-------------------


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About