http://qs1969.pair.com?node_id=989223

Update: Darn - it's back. Completely ignore the below meditation, instead to post a question!

This is a rehash of a stack-overflow answer I just made. I hope that's not against modern Perlmonks etiquette!

I recently got an odd error in some code that definitely worked before:

Can't upgrade BIND (1) to 9 at Foo.pm line 999

Google told me only that someone had seen the same error in a cgi once.

How I fixed it might be instructive although I'm still not exactly sure what it means. The code, that worked in some calling circumstances but not others, was a simple method forwarding method that looked a little like this:

sub quick_method { return shift->SUPER::some_other_method(@_); }

It's a little lazy, sure, but according to perl's left to right evaluation, it should (and usually was) the equivalent of this:

sub quick_method { my $self = shift; my @args = @_; return $self->SUPER::some_other_method(@args); }

I'm guessing that since @_ is, under some circumstances, a special way of accessing the stack and, under other circumstances, a fairly regular global list, the way in which the method was called was hitting different code paths.

Moral of the story - don't get too cute about modifying and using @_ in the same line of code!