aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/List/Breakdown.pm18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/List/Breakdown.pm b/lib/List/Breakdown.pm
index 44efc58..c618c76 100644
--- a/lib/List/Breakdown.pm
+++ b/lib/List/Breakdown.pm
@@ -16,7 +16,7 @@ use base qw(Exporter);
our @EXPORT_OK = 'breakdown';
# Specify package version
-our $VERSION = 0.06;
+our $VERSION = 0.07;
# Dispatch table of functions to handle different ref types for the spec
# hashref's values
@@ -89,7 +89,7 @@ List::Breakdown - Build list sublists matching conditions
=head1 VERSION
-Version 0.06
+Version 0.07
=head1 DESCRIPTION
@@ -120,6 +120,20 @@ You could maybe think of this as a multi-C<grep> that returns named results.
};
my %filtered = breakdown $cats, @words;
+This puts the following structure in C<%filtered>:
+
+ (
+ all => ['foo', 'bar', 'baz', 'quux', 'wibble', 'florb'],
+ has_b => ['bar', 'baz', 'wibble', 'florb'],
+ has_w => ['wibble'],
+ length => {
+ 3 => ['foo', 'bar', 'baz'],
+ 4 => ['quux'],
+ long => ['wibble', 'florb'],
+ },
+ has_ba => ['bar', 'baz'],
+ )
+
=head1 SUBROUTINES/METHODS
=head2 B<breakdown(\%spec, @items)>