diff options
author | Robin Houston <robin@cpan.org> | 2005-12-17 20:44:31 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-12-19 16:26:15 +0000 |
commit | 0d863452f5cac86322a90184dc68dbf446006ed7 (patch) | |
tree | a6b225c0f732e2062a2c430a359c1c1db88fa36c /ext/IO | |
parent | 4f5010f268a8de0d9ea78da367041150ef2777f4 (diff) | |
download | perl-0d863452f5cac86322a90184dc68dbf446006ed7.tar.gz |
latest switch/say/~~
Message-Id: <20051217204431.GB28940@rpc142.cs.man.ac.uk>
p4raw-id: //depot/perl@26400
Diffstat (limited to 'ext/IO')
-rw-r--r-- | ext/IO/lib/IO/Handle.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/IO/lib/IO/Handle.pm b/ext/IO/lib/IO/Handle.pm index 329d26ad19..551988bae5 100644 --- a/ext/IO/lib/IO/Handle.pm +++ b/ext/IO/lib/IO/Handle.pm @@ -69,6 +69,7 @@ corresponding built-in functions: $io->read ( BUF, LEN, [OFFSET] ) $io->print ( ARGS ) $io->printf ( FMT, [ARGS] ) + $io->say ( ARGS ) $io->stat $io->sysread ( BUF, LEN, [OFFSET] ) $io->syswrite ( BUF, [LEN, [OFFSET]] ) @@ -264,7 +265,7 @@ use IO (); # Load the XS module require Exporter; @ISA = qw(Exporter); -$VERSION = "1.25"; +$VERSION = "1.26"; $VERSION = eval $VERSION; @EXPORT_OK = qw( @@ -284,6 +285,7 @@ $VERSION = eval $VERSION; print printf + say getline getlines @@ -407,6 +409,13 @@ sub printf { printf $this @_; } +sub say { + @_ or croak 'usage: $io->say(ARGS)'; + my $this = shift; + use feature 'say'; + say $this @_; +} + sub getline { @_ == 1 or croak 'usage: $io->getline()'; my $this = shift; |