Илья Рассадин writes:
> Why can't you use 'signatures' feature at the first place?
The perl version I am required to use does not support it.
> Usually, it means that you tight yourself to system perl, which is not
> a good decision at all.
>
> Don't trust me on this,
Why can't you use 'signatures' feature at the first place?
Usually, it means that you tight yourself to system perl, which is not a
good decision at all.
Don't trust me on this, trust brian d foy
https://www.effectiveperlprogramming.com/2015/11/apple-recommends-installing-your-own-perl/
hw writes:
> Gil Magno writes:
>
>> 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?
>>
>>
Gil Magno writes:
> 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
>
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
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 line of the carp or croak:
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 @_ inside your
On 19/11/17 15:40, Gil Magno wrote:
> $num_of_params = scalar @_;
Complementing... In order to get the number of params, you could do
$num_of_params = @_;
without using "scalar @_", because this assignment is already in scalar
context.
But if you're in list context, you have to use
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?
On Sun, Nov 19, 2017 at 4:57 PM, hw
Hi,
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?
A test for undef is not sufficient because the value passed to a
function may be undef itself, and I need to be able to distinguish
between the
13 matches
Mail list logo