in reply to Re^2: Prototypes required even after mocking a sub
in thread Prototypes required even after mocking a sub

The specific warning you're talking about here is emitted when you override the sub with a different prototype. https://perldoc.pl/perldiag#Prototype-mismatch:-%25s-vs-%25s (making this a link does not work on this dumb website.)
  • Comment on Re^3: Prototypes required even after mocking a sub

Replies are listed 'Best First'.
Re^4: Prototypes required even after mocking a sub
by stevieb (Canon) on Sep 21, 2018 at 21:23 UTC

    I completely understand why the warning is emitted; I'm looking for answers as to how perl knows about the overwrite, considering the fact I've overwritten the symtab entry for it.

    ps. This "dumb" website does links just fine.

      The post does not go through when I try to make that a link either using [] or html tags. I'm not sure I understand your question; Perl knows about it because you did it, and it checks for a mismatch in prototypes when that happens.
        "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?