diff options
author | Boris Ratner <ratner2@gmail.com> | 2011-02-21 14:39:40 +0200 |
---|---|---|
committer | Florian Ragwitz <rafl@debian.org> | 2011-02-22 03:37:30 +0100 |
commit | f00d33506e6858c5398ebd4748884c1529f24ef7 (patch) | |
tree | 49a86e39ce57f108035d411128bb4299c24a3741 | |
parent | 149d510d6e1a1cffb86aac23789fcb26ff67ffa9 (diff) | |
download | perl-f00d33506e6858c5398ebd4748884c1529f24ef7.tar.gz |
Remove various indirect method calls in IO's docs
Also do the same in some of its error messages. This fixes CPAN RT#65836.
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | dist/IO/IO.pm | 2 | ||||
-rw-r--r-- | dist/IO/lib/IO/Dir.pm | 4 | ||||
-rw-r--r-- | dist/IO/lib/IO/File.pm | 12 | ||||
-rw-r--r-- | dist/IO/lib/IO/Handle.pm | 10 | ||||
-rw-r--r-- | dist/IO/lib/IO/Pipe.pm | 8 | ||||
-rw-r--r-- | dist/IO/lib/IO/Poll.pm | 4 | ||||
-rw-r--r-- | dist/IO/lib/IO/Select.pm | 6 | ||||
-rw-r--r-- | pod/perldelta.pod | 4 |
9 files changed, 28 insertions, 23 deletions
@@ -130,6 +130,7 @@ Bo Borgerson <gigabo@gmail.com> Bo Lindbergh <blgl@stacken.kth.se> Bob Dalgleish <Robert.Dalgleish@sk.sympatico.ca> Bob Wilkinson <bob@fourtheye.org> +Boris Ratner <ratner2@gmail.com> Boris Zentner <bzm@2bz.de> Boyd Gerber <gerberb@zenez.com> Brad Appleton <bradapp@enteract.com> diff --git a/dist/IO/IO.pm b/dist/IO/IO.pm index 1535cbbe42..d6ccbfb1fa 100644 --- a/dist/IO/IO.pm +++ b/dist/IO/IO.pm @@ -7,7 +7,7 @@ use Carp; use strict; use warnings; -our $VERSION = "1.25_03"; +our $VERSION = "1.25_04"; XSLoader::load 'IO', $VERSION; sub import { diff --git a/dist/IO/lib/IO/Dir.pm b/dist/IO/lib/IO/Dir.pm index cce392c2ce..74d0778466 100644 --- a/dist/IO/lib/IO/Dir.pm +++ b/dist/IO/lib/IO/Dir.pm @@ -19,14 +19,14 @@ use File::stat; use File::Spec; @ISA = qw(Tie::Hash Exporter); -$VERSION = "1.07"; +$VERSION = "1.08"; $VERSION = eval $VERSION; @EXPORT_OK = qw(DIR_UNLINK); sub DIR_UNLINK () { 1 } sub new { - @_ >= 1 && @_ <= 2 or croak 'usage: new IO::Dir [DIRNAME]'; + @_ >= 1 && @_ <= 2 or croak 'usage: IO::Dir->new([DIRNAME])'; my $class = shift; my $dh = gensym; if (@_) { diff --git a/dist/IO/lib/IO/File.pm b/dist/IO/lib/IO/File.pm index d33d090d0b..1162c812e3 100644 --- a/dist/IO/lib/IO/File.pm +++ b/dist/IO/lib/IO/File.pm @@ -10,25 +10,25 @@ IO::File - supply object methods for filehandles use IO::File; - $fh = new IO::File; + $fh = IO::File->new(); if ($fh->open("< file")) { print <$fh>; $fh->close; } - $fh = new IO::File "> file"; + $fh = IO::File->new("> file"); if (defined $fh) { print $fh "bar\n"; $fh->close; } - $fh = new IO::File "file", "r"; + $fh = IO::File->new("file", "r"); if (defined $fh) { print <$fh>; undef $fh; # automatically closes the file } - $fh = new IO::File "file", O_WRONLY|O_APPEND; + $fh = IO::File->new("file", O_WRONLY|O_APPEND); if (defined $fh) { print $fh "corge\n"; @@ -137,7 +137,7 @@ require Exporter; @ISA = qw(IO::Handle IO::Seekable Exporter); -$VERSION = "1.14"; +$VERSION = "1.15"; @EXPORT = @IO::Seekable::EXPORT; @@ -157,7 +157,7 @@ sub new { my $type = shift; my $class = ref($type) || $type || "IO::File"; @_ >= 0 && @_ <= 3 - or croak "usage: new $class [FILENAME [,MODE [,PERMS]]]"; + or croak "usage: $class->new([FILENAME [,MODE [,PERMS]]])"; my $fh = $class->SUPER::new(); if (@_) { $fh->open(@_) diff --git a/dist/IO/lib/IO/Handle.pm b/dist/IO/lib/IO/Handle.pm index f4114adc18..f6974eb5bf 100644 --- a/dist/IO/lib/IO/Handle.pm +++ b/dist/IO/lib/IO/Handle.pm @@ -8,13 +8,13 @@ IO::Handle - supply object methods for I/O handles use IO::Handle; - $io = new IO::Handle; + $io = IO::Handle->new(); if ($io->fdopen(fileno(STDIN),"r")) { print $io->getline; $io->close; } - $io = new IO::Handle; + $io = IO::Handle->new(); if ($io->fdopen(fileno(STDOUT),"w")) { $io->print("Some text\n"); } @@ -268,7 +268,7 @@ use IO (); # Load the XS module require Exporter; @ISA = qw(Exporter); -$VERSION = "1.29"; +$VERSION = "1.30"; $VERSION = eval $VERSION; @EXPORT_OK = qw( @@ -309,14 +309,14 @@ $VERSION = eval $VERSION; sub new { my $class = ref($_[0]) || $_[0] || "IO::Handle"; - @_ == 1 or croak "usage: new $class"; + @_ == 1 or croak "usage: $class->new()"; my $io = gensym; bless $io, $class; } sub new_from_fd { my $class = ref($_[0]) || $_[0] || "IO::Handle"; - @_ == 3 or croak "usage: new_from_fd $class FD, MODE"; + @_ == 3 or croak "usage: $class->new_from_fd(FD, MODE)"; my $io = gensym; shift; IO::Handle::fdopen($io, @_) diff --git a/dist/IO/lib/IO/Pipe.pm b/dist/IO/lib/IO/Pipe.pm index 827cc48bfc..3b4313abb1 100644 --- a/dist/IO/lib/IO/Pipe.pm +++ b/dist/IO/lib/IO/Pipe.pm @@ -14,12 +14,12 @@ our($VERSION); use Carp; use Symbol; -$VERSION = "1.13"; +$VERSION = "1.14"; sub new { my $type = shift; my $class = ref($type) || $type || "IO::Pipe"; - @_ == 0 || @_ == 2 or croak "usage: new $class [READFH, WRITEFH]"; + @_ == 0 || @_ == 2 or croak "usage: $class->([READFH, WRITEFH])"; my $me = bless gensym(), $class; @@ -166,7 +166,7 @@ IO::Pipe - supply object methods for pipes use IO::Pipe; - $pipe = new IO::Pipe; + $pipe = IO::Pipe->new(); if($pid = fork()) { # Parent $pipe->reader(); @@ -184,7 +184,7 @@ IO::Pipe - supply object methods for pipes or - $pipe = new IO::Pipe; + $pipe = IO::Pipe->new(); $pipe->reader(qw(ls -l)); diff --git a/dist/IO/lib/IO/Poll.pm b/dist/IO/lib/IO/Poll.pm index e7fb013506..cf7ab26f75 100644 --- a/dist/IO/lib/IO/Poll.pm +++ b/dist/IO/lib/IO/Poll.pm @@ -13,7 +13,7 @@ use Exporter (); our(@ISA, @EXPORT_OK, @EXPORT, $VERSION); @ISA = qw(Exporter); -$VERSION = "0.07"; +$VERSION = "0.08"; @EXPORT = qw( POLLIN POLLOUT @@ -140,7 +140,7 @@ IO::Poll - Object interface to system poll call use IO::Poll qw(POLLRDNORM POLLWRNORM POLLIN POLLHUP); - $poll = new IO::Poll; + $poll = IO::Poll->new(); $poll->mask($input_handle => POLLIN); $poll->mask($output_handle => POLLOUT); diff --git a/dist/IO/lib/IO/Select.pm b/dist/IO/lib/IO/Select.pm index c9da8d4f41..14b9797a95 100644 --- a/dist/IO/lib/IO/Select.pm +++ b/dist/IO/lib/IO/Select.pm @@ -11,7 +11,7 @@ use warnings::register; use vars qw($VERSION @ISA); require Exporter; -$VERSION = "1.18"; +$VERSION = "1.20"; @ISA = qw(Exporter); # This is only so we can do version checking @@ -352,8 +352,8 @@ listening for more connections on a listen socket use IO::Select; use IO::Socket; - $lsn = new IO::Socket::INET(Listen => 1, LocalPort => 8080); - $sel = new IO::Select( $lsn ); + $lsn = IO::Socket::INET->new(Listen => 1, LocalPort => 8080); + $sel = IO::Select->new( $lsn ); while(@ready = $sel->can_read) { foreach $fh (@ready) { diff --git a/pod/perldelta.pod b/pod/perldelta.pod index e9ccfab4bc..7af7ce6d72 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -98,6 +98,10 @@ XXX C<JSON::PP> has been upgraded from version 2.27103 to 2.27104 +=item * + +C<IO> has been upgraded from version 1.25_03 to 1.25_04. + =back =head2 Removed Modules and Pragmata |