On 19/11/17 13:57, hw wrote:
> without being able to use feature 'signatures', how do I verify
> that parameters passed to a function have been passed to it by
> the caller?
https://metacpan.org/pod/signatures
https://metacpan.org/pod/signatures#SEE-ALSO
https://metacpan.org/pod/Sub::Signatures
Chas. Owens wrote:
What no one has said so far is the importance of using Carp when throwing
errors related to how the function was called. The Carp module provides
versions of warn (carp) and die (croak) that give the line and file where the
call to the function occurred rather than the
Gil Magno wrote:
On 19/11/17 13:57, hw wrote:
without being able to use feature 'signatures', how do I verify
that parameters passed to a function have been passed to it by
the caller?
If you're dealing with positional parameters[1] (and not with named
ones) you can check for the size of @_
Andrew Solomon wrote:
This is how I'd go about it:
https://gist.github.com/andrewsolomon/323a2b317ea5903f662fbaaded254798
"exists" is true if there's a key in a hash even if the key's value is undef.
Does that provide a solution for you, or are there other constraints?
That would require to