Ovid wrote: > One concern is where Larry asks: > > I wonder how often we'd have people making the error > of trying to interpoalte into :ok<bad $x pardner> > > > > I'd be one of them. The following is a very common idiom: > > for my $method (@methods) { > can_ok $object, $method; > lives_ok { $object->$method } "... and calling '$method' isn't fatal"; > }
Single angle quotes are just like single quotes in that they don't interpolate, whereas double angle quotes are just like double quotes; they interpolate. So you can just write :ok«... and calling '$method' isn't fatal», or :ok<<...>> or :ok("...") - it's not like there were only one way to write an attribute ;-) Surely people will make mistakes when they blindly assume things, but they'll learn it rather quickly. (BTW I want the non-interpolating test description just as often as the interpolating one, as in :ok<Varible $x got the right value>; but that might be because I'm testing Perl 6, not user-level applications). > Interpolation in the test description is very important on iterative tests or > to distingiush similar tests That's why there's still more than one way to do it ;-) Cheers, Moritz