kappa has asked for the wisdom of the Perl Monks concerning the following question:
sub pop_page_stack { my $self = shift; if (@{$self->{page_stack}}) { $self = pop @{$self->{page_stack}}; bless $self; } return 1; }
This method is intended to be used as: $agent->pop_page_stack; to simulate the "Go back" button in my browser. From my attempts at actually using WWW::Automate, I can say that this method fails. Looks like I found a bug, but how can the intended interface be implemented at all?
I'm now using my own workaround which (above all) changes the interface to $agent = $agent->pop_page_stack;.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Recreating an object from its own method
by chromatic (Archbishop) on Jun 11, 2002 at 17:31 UTC | |
|
Re: Recreating an object from its own method
by Joost (Canon) on Jun 12, 2002 at 12:57 UTC |