summaryrefslogtreecommitdiff
path: root/ext/IO/lib
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-12-19 18:43:04 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-12-19 18:43:04 +0000
commite4769da7e4ba2947901539be526b741c6157838a (patch)
tree5fc1fb2bb5fdf090246786986ba99410d6959374 /ext/IO/lib
parentb188609906d01f80253fa5875023a178dcb87f97 (diff)
downloadperl-e4769da7e4ba2947901539be526b741c6157838a.tar.gz
Attempt at making IO::Handle backwards compatible again
p4raw-id: //depot/perl@26405
Diffstat (limited to 'ext/IO/lib')
-rw-r--r--ext/IO/lib/IO/Handle.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/ext/IO/lib/IO/Handle.pm b/ext/IO/lib/IO/Handle.pm
index 551988bae5..e3b3f7f1c2 100644
--- a/ext/IO/lib/IO/Handle.pm
+++ b/ext/IO/lib/IO/Handle.pm
@@ -409,11 +409,16 @@ sub printf {
printf $this @_;
}
-sub say {
- @_ or croak 'usage: $io->say(ARGS)';
- my $this = shift;
- use feature 'say';
- say $this @_;
+if ($] >= 5.009003) {
+ *say = eval q{ sub {
+ @_ or croak 'usage: $io->say(ARGS)';
+ my $this = shift;
+ use feature 'say';
+ say $this @_;
+ }};
+}
+else {
+ *say = sub { croak "say() is not implemented for this version of perl\n" };
}
sub getline {