[libpath-tiny-perl] 02/11: add documentation example for lines()

Jonas Smedegaard js at alioth.debian.org
Wed Aug 7 16:10:29 UTC 2013


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository libpath-tiny-perl.

commit fba8f5bdde4221a0ac1ac6703863ca2fac1c0544
Author: Gabor Szabo <szabgab at gmail.com>
Date:   Sun Jul 14 09:11:24 2013 +0300

    add documentation example for lines()
---
 lib/Path/Tiny.pm |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/Path/Tiny.pm b/lib/Path/Tiny.pm
index c7bf5ed..68f8865 100644
--- a/lib/Path/Tiny.pm
+++ b/lib/Path/Tiny.pm
@@ -544,6 +544,8 @@ sub iterator {
     @contents = path("/tmp/foo.txt")->lines_raw;
     @contents = path("/tmp/foo.txt")->lines_utf8;
 
+    @contents = path("/tmp/foo.txt")->lines( { chomp => 1, count => 4 } );
+
 Returns a list of lines from a file.  Optionally takes a hash-reference of
 options.  Valid options are C<binmode>, C<count> and C<chomp>.  If C<binmode>
 is provided, it will be set on the handle prior to reading.  If C<count> is

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libpath-tiny-perl.git



More information about the Pkg-perl-cvs-commits mailing list