Subject: | Make findvalue() return a list in list context |
A common need is a findvalue() that returns a list in list context, instead of a single concatenated string. For example,
$string = $doc->findvalue('//cell'); #as currently implemented
@cells = $doc->findvalue('//cell'); #return a list of cell values
In fact, this is the way most people assumes it works, judging by the amount of times this gets asked on various lists.
If for some reason, you do not want findvalue() to check the context, an alternate solution would be to add a convenience method findvalues() which returns a list.