Over the last two days I was chasing a bug in my re-written mp3-player. Eventually with the help of Carp::confess
I was able to see what was going on: A method received an additional argument although this was impossible. The line that confess
included in its stacktrace was this:
my $pattern = $self->get_input($state, $compl ? $compl : $state->search);
confess
, resulted in ActionLoop::search(ActionLoop=HASH(0x814cbb8), 1)
. I wonder under which contrived circumstances $obj->method
can produce an additional argument. $state->search()
did not fix it. The only way was passing undef
explicitely.goto &func
. I am very sure that the bug immediately disappears when I try to strip it down enough to include it in a bug report. Re:push @_, 1;
ethan on 2004-10-21T11:18:28
somebody is stacking @_, it doesn't happen spontaneously
Naturally, I also suspected @_ especially asgoto &func
was involved. But that's very probably not it. The line where the spurious argument was produced, was around 5 lines into the method that was called via goto. All other method calls in there behaved normally. Also, autopassing of@_
should never happen on ordinary method calls.