This Perl 5 module generalises the mechanism of the wantarray
function, allowing a function to determine in some detail how its
return value is going to be immediately used.

Homepage:
https://metacpan.org/release/Want
