diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-08 18:28:13 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-08 18:28:13 +0000 |
commit | 91e74348ab129f737e0d9da75481cd4eb7414ba4 (patch) | |
tree | b700d3ed7ddb36fb2d15c007f31f5bd0346d8418 /ext | |
parent | 1426bbf4b7d39af0f80ec0afcb4869d2bc3f0a90 (diff) | |
download | perl-91e74348ab129f737e0d9da75481cd4eb7414ba4.tar.gz |
Do away with array context, from Daniel Chetlin <daniel@chetlin.com>
(either perlbug or p5p ate the original), plus regen
perlapi and perltoc.
p4raw-id: //depot/perl@6553
Diffstat (limited to 'ext')
-rw-r--r-- | ext/B/ramblings/flip-flop | 4 | ||||
-rw-r--r-- | ext/Data/Dumper/Dumper.pm | 6 | ||||
-rw-r--r-- | ext/IO/lib/IO/Handle.pm | 8 | ||||
-rw-r--r-- | ext/IO/lib/IO/Socket.pm | 2 | ||||
-rw-r--r-- | ext/Socket/Socket.pm | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/ext/B/ramblings/flip-flop b/ext/B/ramblings/flip-flop index e0cb8ff620..e08333d172 100644 --- a/ext/B/ramblings/flip-flop +++ b/ext/B/ramblings/flip-flop @@ -9,13 +9,13 @@ PP(pp_range) } pp_range is a LOGOP. -In array context, it just returns op_next. +In list context, it just returns op_next. In scalar context it checks the truth of targ and returns op_other if true, op_next if false. flip is an UNOP. It "looks after" its child which is always a pp_range LOGOP. -In array context, it just returns the child's op_other. +In list context, it just returns the child's op_other. In scalar context, there are three possible outcomes: (1) set child's targ to 1, our targ to 1 and return op_next. (2) set child's targ to 1, our targ to 0, sp-- and return child's op_other. diff --git a/ext/Data/Dumper/Dumper.pm b/ext/Data/Dumper/Dumper.pm index 93b87f9aba..0ff48e648c 100644 --- a/ext/Data/Dumper/Dumper.pm +++ b/ext/Data/Dumper/Dumper.pm @@ -685,7 +685,7 @@ the last. Returns the stringified form of the values stored in the object (preserving the order in which they were supplied to C<new>), subject to the -configuration options below. In an array context, it returns a list +configuration options below. In a list context, it returns a list of strings corresponding to the supplied values. The second form, for convenience, simply calls the C<new> method on its @@ -701,7 +701,7 @@ dumping subroutine references. Expects a anonymous hash of name => value pairs. Same rules apply for names as in C<new>. If no argument is supplied, will return the "seen" list of -name => value pairs, in an array context. Otherwise, returns the object +name => value pairs, in a list context. Otherwise, returns the object itself. =item I<$OBJ>->Values(I<[ARRAYREF]>) @@ -732,7 +732,7 @@ itself. Returns the stringified form of the values in the list, subject to the configuration options below. The values will be named C<$VAR>I<n> in the output, where I<n> is a numeric suffix. Will return a list of strings -in an array context. +in a list context. =back diff --git a/ext/IO/lib/IO/Handle.pm b/ext/IO/lib/IO/Handle.pm index 930df55fec..9d84206b5c 100644 --- a/ext/IO/lib/IO/Handle.pm +++ b/ext/IO/lib/IO/Handle.pm @@ -115,13 +115,13 @@ Returns true if the object is currently a valid file descriptor. =item $io->getline This works like <$io> described in L<perlop/"I/O Operators"> -except that it's more readable and can be safely called in an -array context but still returns just one line. +except that it's more readable and can be safely called in a +list context but still returns just one line. =item $io->getlines -This works like <$io> when called in an array context to -read all the remaining lines in a file, except that it's more readable. +This works like <$io> when called in a list context to read all +the remaining lines in a file, except that it's more readable. It will also croak() if accidentally called in a scalar context. =item $io->ungetc ( ORD ) diff --git a/ext/IO/lib/IO/Socket.pm b/ext/IO/lib/IO/Socket.pm index 6884f02cf8..b8da092669 100644 --- a/ext/IO/lib/IO/Socket.pm +++ b/ext/IO/lib/IO/Socket.pm @@ -361,7 +361,7 @@ perform the system call C<accept> on the socket and return a new object. The new object will be created in the same class as the listen socket, unless C<PKG> is specified. This object can be used to communicate with the client that was trying to connect. In a scalar context the new socket is returned, -or undef upon failure. In an array context a two-element array is returned +or undef upon failure. In a list context a two-element array is returned containing the new socket and the peer address; the list will be empty upon failure. diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm index 025888d8ab..b4a0419cbc 100644 --- a/ext/Socket/Socket.pm +++ b/ext/Socket/Socket.pm @@ -111,7 +111,7 @@ to inet_aton('255.255.255.255'). =item sockaddr_in SOCKADDR_IN -In an array context, unpacks its SOCKADDR_IN argument and returns an array +In a list context, unpacks its SOCKADDR_IN argument and returns an array consisting of (PORT, ADDRESS). In a scalar context, packs its (PORT, ADDRESS) arguments as a SOCKADDR_IN and returns it. If this is confusing, use pack_sockaddr_in() and unpack_sockaddr_in() explicitly. @@ -135,7 +135,7 @@ Will croak if the structure does not have AF_INET in the right place. =item sockaddr_un SOCKADDR_UN -In an array context, unpacks its SOCKADDR_UN argument and returns an array +In a list context, unpacks its SOCKADDR_UN argument and returns an array consisting of (PATHNAME). In a scalar context, packs its PATHNAME arguments as a SOCKADDR_UN and returns it. If this is confusing, use pack_sockaddr_un() and unpack_sockaddr_un() explicitly. |