The use case I have in mind is a combined getter/setter for a perl object. Return the value when called without an additional arg, set the value when called with an arg. A call with an undefined arg clears the attribute - just like in my example.
Maybe that's not a real world use case - I'm just playing with things.
Greetings,
-jo
In reply to Re^2: Distinguish between missing and undefined arguments with subroutine signatures
by jo37
in thread Distinguish between missing and undefined arguments with subroutine signatures
by jo37
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |