From: Dan Book Date: Mon, 9 Nov 2015 07:17:36 +0000 (-0500) Subject: better example text X-Git-Tag: v0.001~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FDOM-Tiny.git;a=commitdiff_plain;h=c7bc4d31fbf73e6282cac692046d8627c0297b13 better example text --- diff --git a/README.pod b/README.pod index 2bf0aa8..c827c68 100644 --- a/README.pod +++ b/README.pod @@ -952,8 +952,8 @@ passed to the callback and is also available as C<$_>. # Longer version my $first = $collection->first(sub { $_->$method(@args) }); - # Find first value that contains the word "dom" - my $interesting = $collection->first(qr/dom/i); + # Find first value that contains the word "tiny" + my $interesting = $collection->first(qr/tiny/i); # Find first value that is greater than 5 my $greater = $collection->first(sub { $_ > 5 }); @@ -984,8 +984,8 @@ C<$_>. # Longer version my $new = $collection->grep(sub { $_->$method(@args) }); - # Find all values that contain the word "dom" - my $interesting = $collection->grep(qr/dom/i); + # Find all values that contain the word "tiny" + my $interesting = $collection->grep(qr/tiny/i); # Find all values that are greater than 5 my $greater = $collection->grep(sub { $_ > 5 }); @@ -1019,8 +1019,8 @@ passed to the callback and is also available as C<$_>. # Longer version my $new = $collection->map(sub { $_->$method(@args) }); - # Append the word "dom" to all values - my $domified = $collection->map(sub { $_ . 'dom' }); + # Append the word "tiny" to all values + my $domified = $collection->map(sub { $_ . 'tiny' }); =head2 reduce diff --git a/lib/DOM/Tiny.pm b/lib/DOM/Tiny.pm index 5bfa2ae..e429cbf 100644 --- a/lib/DOM/Tiny.pm +++ b/lib/DOM/Tiny.pm @@ -1339,8 +1339,8 @@ passed to the callback and is also available as C<$_>. # Longer version my $first = $collection->first(sub { $_->$method(@args) }); - # Find first value that contains the word "dom" - my $interesting = $collection->first(qr/dom/i); + # Find first value that contains the word "tiny" + my $interesting = $collection->first(qr/tiny/i); # Find first value that is greater than 5 my $greater = $collection->first(sub { $_ > 5 }); @@ -1371,8 +1371,8 @@ C<$_>. # Longer version my $new = $collection->grep(sub { $_->$method(@args) }); - # Find all values that contain the word "dom" - my $interesting = $collection->grep(qr/dom/i); + # Find all values that contain the word "tiny" + my $interesting = $collection->grep(qr/tiny/i); # Find all values that are greater than 5 my $greater = $collection->grep(sub { $_ > 5 }); @@ -1406,8 +1406,8 @@ passed to the callback and is also available as C<$_>. # Longer version my $new = $collection->map(sub { $_->$method(@args) }); - # Append the word "dom" to all values - my $domified = $collection->map(sub { $_ . 'dom' }); + # Append the word "tiny" to all values + my $domified = $collection->map(sub { $_ . 'tiny' }); =head2 reduce