in reply to Re^3: Distinguish between missing and undefined arguments with subroutine signatures (semipredicate problem)
in thread Distinguish between missing and undefined arguments with subroutine signatures

use constant MISSING => bless {}, "MyPackg::__Missing__"

That's a very good solution.

Thx.

Greetings,
-jo

$gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$
  • Comment on Re^4: Distinguish between missing and undefined arguments with subroutine signatures (semipredicate problem)
  • Download Code

Replies are listed 'Best First'.
Re^5: Distinguish between missing and undefined arguments with subroutine signatures (semipredicate problem)
by LanX (Saint) on Dec 27, 2020 at 20:34 UTC
    > That's a very good solution.

    Thanks, that's my favorite solution for the semipredicate problem. :)

    But in this particular case, I'd say checking @_ is better.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery