Perl's lack of 'in' keyword

Matt S Trout dbix-class at trout.me.uk
Wed Oct 8 12:08:31 BST 2008


On Tue, Oct 07, 2008 at 04:20:57PM +0100, Dagfinn Ilmari Mannsåker wrote:
> "Paul Makepeace" <paulm at paulm.com> writes:
> 
> > ... is starting to frustrate me. It's the one feature I am finding I'm
> > really missing from That Other Language.
> >
> >   if ($bar in @foo) {
> >     # ...
> >   }
> 
> use Perl6::Junction qw/any/;
> 
> if ($bar eq any(@foo)) {
>   # ...
> }

And note that Perl6::Junction is a relatively crack-free module - no
non-core deps and a pretty clean implementation. The only real crack in
there is the heavy use of operator overloading, and I've kinda reached the
point where that doesn't count as crack at all to me :)

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/


More information about the london.pm mailing list