Closed mschae94 closed 5 years ago
Thanks @mschae94!
@petdance this would close a pretty old issue: https://web.archive.org/web/20130622184440/http://code.google.com/p/www-mechanize/issues/detail?id=237
Sounds good to me. Are you wanting me to do something?
Do we need to clear other variables such as $self->{req}, $self->{res} too?
Do we need to clear other variables such as $self->{req}, $self->{res} too?
I think since this is just deleting the stack, we want to keep the information for the last request around. https://metacpan.org/source/OALDERS/WWW-Mechanize-1.88/lib/WWW/Mechanize.pm#L206-218
@petdance if you had a moment to eyeball the code, that would be helpful. I didn't see any issues, but more eyes on the code is better.
I think $self->{page_stack}
should get reinitialized to an empty []
, just like in new
, after it gets delete
d.
Are we still supporting Perls all the way back to 5.6.1? Even on ack I require 5.10.1.
The test seems to be mixing Test and Test2 style matches. I'm seeing both isa
and isa_ok
.
That's all I'm seeing. All seems sensible to me.
@oalders
I think since this is just deleting the stack, we want to keep the information for the last request around.
I see.
Are we still supporting Perls all the way back to 5.6.1? Even on ack I require 5.10.1.
We've been keeping stuff backwards compatible as far as possible unless there's a compelling reason not to.
I'm seeing both isa and isa_ok.
Yeah, I'm not sure isa_ok()
is providing much benefit. We could probably delete those checks.
That's all I'm seeing. All seems sensible to me.
Thanks for the review @petdance!
The test seems to be mixing Test and Test2 style matches. I'm seeing both isa and isa_ok.
Actually, for the isa_ok
, I have copied some codes from the existing tests for the consistency purpose.
For the isa
, this is one of the special comparisons provided by Test::Deep.
I think $self->{page_stack} should get reinitialized to an empty [], just like in new, after it gets deleted.
In _push_page_stack
it reinitializes to an empty []
if $self->{page_stack}
does not exist. Therefore, we can simply delete the key i guess.
For what it's worth, I don't see any issues with the changes either. But I'm just a passer-by and I've helped @mschae94 implement them. :)
Thanks @mschae94, @petdance, @skaji and @simbabque!
closes #214