Skip Menu |

This queue is for tickets about the Iterator-Simple CPAN distribution.

Report information
The Basics
Id: 113983
Status: new
Priority: 0/
Queue: Iterator-Simple

People
Owner: Nobody in particular
Requestors: slava.litvinov [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: enhancement: smart match support
Date: Mon, 25 Apr 2016 14:16:59 -0700
To: bug-Iterator-Simple [...] rt.cpan.org
From: Slava Litvinov <slava.litvinov [...] gmail.com>
It would be extremely useful to support smart match operator. Basically the change is the Iterator/Simple.pm to include use overload; use overload '~~' => \&Iterator::Simple::Iterator::contains; sub contains { my ( $self, $what ) = @_; while ( my $item = $self->next() ) { return 1 if $what ~~ $item; } return 0; }