"The post does not go through when I try to make that a link either using [] or html tags"
Fair enough. We do have a subset and mix of things here. [link_to_something|words to describe] is kind of backwards, but I digress.
Getting to the point, I understand that perl knows about it, there's no question there. My question is *how* perl knows about the prototype(s), after I have effectively pissed all over the symtab entry for the sub.
My question, more directly: Why and how does perl know that the sub I'm faking out (effectively), still keep reference to the prototypes that were involved in the subroutine I faked?
| [reply] [Watch: Dir/Any] [d/l] |
It doesn't; as mentioned in the other thread it may compile against the original sub before it even gets to the prototype, as prototypes are used in the parsing phase. For example, the prototype ($) completely changes the meaning of this code: my @results = (foo 3, 5); If foo has a prototype of ($) then it will be executed as my @results = (foo(3), 5); rather than "slurping" up all the arguments available to it. This means that the parser constructs a completely different optree in this case. Overriding foo after that has been parsed doesn't change that.
| [reply] [Watch: Dir/Any] [d/l] [select] |