Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 46460
Status: rejected
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: Yoshikawa.Hiroshi [...] zx.MitsubishiElectric.co.jp
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.54
Fixed in: (no value)



Subject: Cloned Mech and original Mech are not independent each other
Download (untitled) / with headers
text/plain 1.6k
In following Code, I expected that $Mech and it's cloned $Mech2 should be independent each other. However when $Mech2's inputbox 'S56' is changed , $Mech's inputbox is set to same value! ----------------------------------------------------------- use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get($url); my $mech2 = $mech->clone(); my $temp = $mech->form_name('MainForm')->value('S65'); my $temp2 = $mech2->form_name('MainForm')->value('S65'); print "\$mech's S65 = $temp\n"; print "\$mech2's S65 = $temp2\n"; $mech2->set_fields( S65 => 'ABC' ); $temp = $mech->form_name('MainForm')->value('S65'); $temp2 = $mech2->form_name('MainForm')->value('S65'); print "\$mech's S65 = $temp\n"; print "\$mech2's S65 = $temp2\n"; $mech->set_fields( S65 => 'ABCd' ); $temp = $mech->form_name('MainForm')->value('S65'); $temp2 = $mech2->form_name('MainForm')->value('S65'); print "\$mech's S65 = $temp\n"; print "\$mech2's S65 = $temp2\n"; ------------------------------------------------------- The outputs are $mech's S65 = $mech2's S65 = $mech's S65 = ABC $mech2's S65 = ABC $mech's S65 = ABCd $mech2's S65 = ABCd ------------------------------------------------------- Version Information This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 18 registered patches, see perl -V for more detail) Copyright 1987-2007, Larry Wall Binary build 822 [280952] provided by ActiveState http://www.ActiveState.com Built Jul 31 2007 19:34:48 WWW-Mechanize : 1.540, HTTP-Server-Simple:0.28 Os: Windows Xp Pro 2002 SP3 Why? but Cloned object and original object points defferent address. for example, $mech = WWW::Mechanize=HASH(0x1cd92dc) $mech2 = WWW::Mechanize=HASH(0x233c980)
Download (untitled) / with headers
text/plain 151b
Mech no longer uses rt.cpan.org. If this is still an issue, please repost at http://code.google.com/p/www-mechanize/issues/list Thanks, xoxo, Andy


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.