diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-06 13:44:26 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-06 13:44:26 +1300 |
commit | 41e1c21c6ab173fd623f5cb393fe4bf8f5e23f41 (patch) | |
tree | 4a20270569ff17bbcd18ca9e65457577e24da558 /lib/List | |
parent | Update the README.markdown (diff) | |
download | List-Breakdown-41e1c21c6ab173fd623f5cb393fe4bf8f5e23f41.tar.gz List-Breakdown-41e1c21c6ab173fd623f5cb393fe4bf8f5e23f41.zip |
Describe exporting in documentation
Diffstat (limited to 'lib/List')
-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: |