in reply to when do $@ get cleared ?
on every eval() is always set on failure and cleared on success
It gets cleared every time an eval block is run. It is certainly within WWW::Mechanize's rights to use an eval. If you need it to be persistent across a call to reload, you should be able to localize the variable (untested):
do{ eval{ $browser->get('http://www.example.org/?node=whatever'); }; if($@){ print "WARNING: $@"; local $@; $browser->reload(); #kills if-level $@, but not do-level $@ } }while($@);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: when do $@ get cleared ?
by ikegami (Patriarch) on Jul 14, 2010 at 18:22 UTC |