in reply to Re^6: Distinguish between missing and undefined arguments with subroutine signatures (semipredicate problem)
in thread Distinguish between missing and undefined arguments with subroutine signatures
Wait a second....
If you are talking about compile-time checking a ->method I'm pretty sure that this can't be done in dynamically typed languages like Perl.
Like with prototypes I expect this only to be possible with normal subs. ( without static typing of the $obj it's impossible to tell which ->methods are allowed, normal subs OTOH can be pre-declared.)
And when doing a dynamic check at run-time, using a @slurpy array is just good enough.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Distinguish between missing and undefined arguments with subroutine signatures (methods with signatures?)
by jo37 (Curate) on Dec 27, 2020 at 21:53 UTC | |
by LanX (Saint) on Dec 27, 2020 at 21:59 UTC |