David Nicol wrote: > On Fri, Mar 21, 2008 at 6:13 PM, Mark Mielke <mark@mark.mielke.cc> wrote: > >> Does this explain it Dave? >> >> > > but that doesn't work either; the problem is that $@ gets unlocalized after > eval assigns to it, even when the argument to die has nothing to do with $@. > > > perl -le 'eval { local $@; die "yabbazabba" }; print $@||"nothing there"' > > So including an attempt at pass-by-copy in the documentation of what > doesn't work (1) indicates that thinking it might be a pass-by-copy problem > is reasonable and (2) documents by example quoting as a method to force > pass-by-copy. > I see what you mean now. Yes, I've hit this too. I may have misunderstood the original problem as well. The issue being, that die stores to $@ before $@ is restored to its original value, making the die unavailable. If this is the original problem, then yes, it's not a pass-by-reference problem, but a local vs my problem. When I hit the above issue before, my conclusion was that local was the wrong choice for $@ and that my would have worked a lot better(?). But again, a "too late now, don't complain, just move on" is the route I took. Cheers, mark -- Mark Mielke <mark@mielke.cc>Thread Previous | Thread Next