Closed pdl closed 11 years ago
Would it work for p
in boolean context to do p->validate($_)
? Then you could do fun things like for (@_){ tr/a-z/A-Z/ if (pSt); }
Would it work for
p
in boolean context to dop->validate($_)
?
On second thoughts, this is probably a terrible idea, as it could get called inadvertently.
It would be good for
ok
andvalidate
methods, when called without arguments, to infer$_
as the test subject, so you can do things likewhile (<>){ say ($pLine->ok ? $_ : '') };
But make sure that
p->ok(undef)
does not take$_
.