Ricardo Signes wrote:
> C<defined> does not really impose scalar context as usually understood. For
> example, defined(&foo) does not call foo in scalar context. It is its own
> thing, which is, basically, the problem.
This is a syntactic distinction. defined(&foo), defined(@foo) and defined(%foo) are special cases. All others (should) work this way (bugs aside):
$ perl -le 'sub context { print qw[void scalar list][wantarray + defined wantarray] } defined context'
scalar
Thread Previous
|
Thread Next