in reply to Re: subroutine prototypes effectiveness across files?
in thread subroutine prototypes effectiveness across files?

So out of curiosity, what is the mechanism for adding new routines which are to act like built-in functions if parameter checking is desired?

As it is, prototyping has limited appeal if it is restricted to same file usage.

Thanks for setting me straight. I'll have to look more in earnest at objects.

  • Comment on Re: Re: subroutine prototypes effectiveness across files?

Replies are listed 'Best First'.
Re: Re: Re: subroutine prototypes effectiveness across files?
by chromatic (Archbishop) on Oct 24, 2003 at 23:07 UTC
    what is the mechanism for adding new routines which are to act like built-in functions if parameter checking is desired?

    Prototyping, as I said.

    As it is, prototyping has limited appeal if it is restricted to same file usage.

    There is no such restriction.

    While I said that require fires too late for perl to do anything with your prototypes, I also gave you a suggestion on how to require your other files in time for perl to check the prototypes on your functions. Give it a whirl; I think you'll find that it works as you expected your first attempt to work.