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

I really don't like using sig handlers on a large scale for the reason you stated. I try to limit scope as best as possible.

The no warnings 'prototype'; is one that I didn't come across (I'll be honest, I didn't dig deep enough). I can make that user-selectable, so that users have to turn that off explicitly so there's no confusion (barf first, re-read docs, then disable).

That said, I'm still uncertain how this works. I desire to know *why* the prototypes exist after I've over-written the symtab entry for the subroutine.

Replies are listed 'Best First'.
Re^3: Prototypes required even after mocking a sub
by Anonymous Monk on Sep 21, 2018 at 21:02 UTC
    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.)

      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.