in reply to Re^8: Distinguish between missing and undefined arguments with subroutine signatures (methods with signatures?)
in thread Distinguish between missing and undefined arguments with subroutine signatures
I can't follow anymore.
You want 1 argument for a setter, and 0 arguments for a getter.
Hence you need a conditional check anyway.
So use a @slurpy parameter and check the size at runtime.
Then die "too many arguments" if @slurpy > 1
Problem solved.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|