#!/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;
In reply to Re: wantarray propagation?
by Khen1950fx
in thread wantarray propagation?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |