diff options
-rw-r--r-- | lib/List/Breakdown.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/List/Breakdown.pm b/lib/List/Breakdown.pm index f4e925b..e5b8874 100644 --- a/lib/List/Breakdown.pm +++ b/lib/List/Breakdown.pm @@ -118,6 +118,8 @@ You could maybe think of this as a multi-C<grep> that returns named results. =head1 SYNOPSIS + use List::Breakdown 'breakdown'; + ... my @words = qw(foo bar baz quux wibble florb); my $cats = { all => sub { 1 }, @@ -150,10 +152,11 @@ This puts the following structure in C<%filtered>: =head2 B<breakdown(\%spec, @items)> -Given a hash reference structure and a list of items, apply each of the -subroutines or regular expressions given as values of the hash reference, -returning a new hash in the same structure with the tests replaced with the -items for which the subroutine returns true, in the same way as C<grep>. +Exportable subroutine; given a hash reference structure and a list of items, +apply each of the subroutines or regular expressions given as values of the +hash reference, returning a new hash in the same structure with the tests +replaced with the items for which the subroutine returns true, in the same way +as C<grep>. There are two shortcut syntaxes: |