in reply to wantarray propagation?

You can force VOID context by using Gives. You can also get greater control of wantarray by using Want. Here's what I did:
#!/usr/bin/perl use strict; use warnings; use Gives; use Want 'want'; sub test : Gives( @Contexts ) { if (defined want('VOID')) { print "test: wantarray is undefined\n"; } elsif (want('SCALAR')) { print "test: wantarray is true\n"; } else { print "test: wantarray is false\n"; } } sub test2 { test(); } print test2;