☰
Debian Codegraph
@
1.33-2
/
/
t
/
first_index.t
☽
☼
t/first_index.t
code
plain
raw
symbols
SCIP
Artistic
or
GPL-1+
2009, 2010, 2011, Scott Walters <
[email protected]
>
debian/copyright
1
#!/usr/bin/env perl
2
3
use
autobox::Core
;
4
use
Test::More
tests => 3;
5
6
my
@numbers
= ( 1 .. 10 );
7
8
is
(
@numbers
->
first_index
, 0 );
9
is
(
@numbers
->
first_index
( sub {
$_
[0] > 9 } ), 9 );
10
11
is
(
@numbers
->
first_index
( qr/^2/ ), 1 );