From 41e1c21c6ab173fd623f5cb393fe4bf8f5e23f41 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 6 Oct 2017 13:44:26 +1300 Subject: Describe exporting in documentation --- lib/List/Breakdown.pm | 11 +++++++---- 1 file 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 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 -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. +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. There are two shortcut syntaxes: -- cgit v1.2.3