I'd like to construct a prototype which checks at compile time for a "real scalar value" instead of forcing scalar context.
I'd be surprised if that was possible. It also begs the question what to do with test1 other_function
if not forcing scalar context onto other_function. Since context propagates inwards in Perl 5, other_function has to be called in some context, forcing the the return value of other_function to be in that context.
What do you need that feature for? It might be an XY Problem
In reply to Re: Prototype for constant items?
by moritz
in thread Prototype for constant items???
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |