Subject: | DWIM when parsing in scalar context |
This should DWIM, but it doesn't:
my $address = Email::Address->parse( $from_header );
Instead, $address contains the number of addresses found since parse()
returns an array.
It would be nice if parse() would DWIM and check wantarray and return
the first address if called in scalar context or the full list if called
in list context.
Alternatively, at please document this behavior as a "gotcha" in the POD
for parse().
-- David