qrazhan/perl5i — comment on commit 99e6b80ce70698c85478e826e6d420bcc4b6414c
File: t/pick.t line 35
By schwern:

That `is` makes the mistake of assuming that a true value will be 1. It may not be so. Use `ok`.

You can cut out a lot of those temporary variables.

my $elem = $array->pick_one;
ok $array->as_hash->{$elem};

This is taking advantage of `as_hash` returning a hash reference in scalar context. We can chain off of that without having to assign the hash ref to its own variable, just like you can chain method calls that return objects.