That doesn't contradict my point, which was that goto has 3 effects: transmitting @_ directly, removing the current function from the call stack and clearing the effect of local. If all you want to do is jump to another function without touching @_, this can be done like this:
I have quoted the relevant documentation in my previous post.sub oldFunctionName { &newFunctionName; }
Besides, since goto does this extra work, I wouldn't be confident about saying that it uses less CPU. Also perl does plenty of things under the hood, and the documentation calls it "magic". I would never conclude that a feature takes less CPU time based on the description of what it does alone.
There is no dereferencing in your code though, dereferencing would like one of those lines:
Sadly the syntax for a method call works only on (some) references, and also uses the arrow operator ( -> ) so it's quite confusing.$$self; ${$self}; @{$self}; %{$self}; $self->{Key}; $self->[0];
In reply to Re^4: Number of times I've used goto in Perl
by Eily
in thread Number of times I've used goto in Perl
by vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |