summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod')
-rw-r--r--pod/perl5005delta.pod2
-rw-r--r--pod/perlapi.pod29
-rw-r--r--pod/perlcall.pod6
-rw-r--r--pod/perldiag.pod58
-rw-r--r--pod/perlembed.pod10
-rw-r--r--pod/perlfunc.pod4
-rw-r--r--pod/perlglossary.pod3
-rw-r--r--pod/perlguts.pod14
-rw-r--r--pod/perlipc.pod8
-rw-r--r--pod/perlothrtut.pod18
-rw-r--r--pod/perlrepository.pod4
-rw-r--r--pod/perlsec.pod9
-rw-r--r--pod/perltodo.pod19
13 files changed, 76 insertions, 108 deletions
diff --git a/pod/perl5005delta.pod b/pod/perl5005delta.pod
index 39646b66dc..6420f87fa9 100644
--- a/pod/perl5005delta.pod
+++ b/pod/perl5005delta.pod
@@ -101,7 +101,7 @@ If you see a compiler error that talks about the variable C<thr> not
being declared (when building a module that has XS code), you need
to add C<dTHR;> at the beginning of the block that elicited the error.
-The API function C<perl_get_sv("@",FALSE)> should be used instead of
+The API function C<perl_get_sv("@",GV_ADD)> should be used instead of
directly accessing perl globals as C<GvSV(errgv)>. The API call is
backward compatible with existing perls and provides source compatibility
with threading is enabled.
diff --git a/pod/perlapi.pod b/pod/perlapi.pod
index 8c3e6d6bb6..fc51e14034 100644
--- a/pod/perlapi.pod
+++ b/pod/perlapi.pod
@@ -354,13 +354,14 @@ Found in file av.c
=item get_av
X<get_av>
-Returns the AV of the specified Perl array. If C<create> is set and the
-Perl variable does not exist then it will be created. If C<create> is not
-set and the variable does not exist then NULL is returned.
+Returns the AV of the specified Perl array. C<flags> are passed to
+C<gv_fetchpv>. If C<GV_ADD> is set and the
+Perl variable does not exist then it will be created. If C<flags> is zero
+and the variable does not exist then NULL is returned.
NOTE: the perl_ form of this function is deprecated.
- AV* get_av(const char* name, I32 create)
+ AV* get_av(const char *name, I32 flags)
=for hackers
Found in file perl.c
@@ -1484,13 +1485,14 @@ Found in file handy.h
=item get_hv
X<get_hv>
-Returns the HV of the specified Perl hash. If C<create> is set and the
-Perl variable does not exist then it will be created. If C<create> is not
-set and the variable does not exist then NULL is returned.
+Returns the HV of the specified Perl hash. C<flags> are passed to
+C<gv_fetchpv>. If C<GV_ADD> is set and the
+Perl variable does not exist then it will be created. If C<flags> is zero
+and the variable does not exist then NULL is returned.
NOTE: the perl_ form of this function is deprecated.
- HV* get_hv(const char* name, I32 create)
+ HV* get_hv(const char *name, I32 flags)
=for hackers
Found in file perl.c
@@ -3985,13 +3987,14 @@ Found in file universal.c
=item get_sv
X<get_sv>
-Returns the SV of the specified Perl scalar. If C<create> is set and the
-Perl variable does not exist then it will be created. If C<create> is not
-set and the variable does not exist then NULL is returned.
+Returns the SV of the specified Perl scalar. C<flags> are passed to
+C<gv_fetchpv>. If C<GV_ADD> is set and the
+Perl variable does not exist then it will be created. If C<flags> is zero
+and the variable does not exist then NULL is returned.
NOTE: the perl_ form of this function is deprecated.
- SV* get_sv(const char* name, I32 create)
+ SV* get_sv(const char *name, I32 flags)
=for hackers
Found in file perl.c
@@ -7333,7 +7336,7 @@ sidestepping the normal C order of execution. See C<warn>.
If you want to throw an exception object, assign the object to
C<$@> and then pass C<NULL> to croak():
- errsv = get_sv("@", TRUE);
+ errsv = get_sv("@", GV_ADD);
sv_setsv(errsv, exception_object);
croak(NULL);
diff --git a/pod/perlcall.pod b/pod/perlcall.pod
index 08173d2e69..06f3aa33c7 100644
--- a/pod/perlcall.pod
+++ b/pod/perlcall.pod
@@ -1218,9 +1218,9 @@ virtual. The static method, C<PrintID>, prints out simply the class
name and a version number. The virtual method, C<Display>, prints out a
single element of the array. Here is an all Perl example of using it.
- $a = new Mine ('red', 'green', 'blue');
+ $a = Mine->new('red', 'green', 'blue');
$a->Display(1);
- PrintID Mine;
+ Mine->PrintID;
will print
@@ -1277,7 +1277,7 @@ the C<PrintID> and C<Display> methods from C.
So the methods C<PrintID> and C<Display> can be invoked like this
- $a = new Mine ('red', 'green', 'blue');
+ $a = Mine->new('red', 'green', 'blue');
call_Method($a, 'Display', 1);
call_PrintID('Mine', 'PrintID');
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index e06dd5e2f6..9aeaff7a0d 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -651,24 +651,6 @@ inplace editing with the B<-i> switch. The file was ignored.
regexp to match something 0 times, just put {0}. The <-- HERE shows in the
regular expression about where the problem was discovered. See L<perlre>.
-=item Can't do setegid!
-
-(P) The setegid() call failed for some reason in the setuid emulator of
-suidperl.
-
-=item Can't do seteuid!
-
-(P) The setuid emulator of suidperl failed for some reason.
-
-=item Can't do setuid
-
-(F) This typically means that ordinary perl tried to exec suidperl to do
-setuid emulation, but couldn't exec it. It looks for a name of the form
-sperl5.000 in the same directory that the perl executable resides under
-the name perl5.000, typically /usr/local/bin on Unix machines. If the
-file is there, check the execute permissions. If it isn't, ask your
-sysadmin why he and/or she removed it.
-
=item Can't do waitpid with flags
(F) This machine doesn't have either waitpid() or wait4(), so only
@@ -757,11 +739,16 @@ If you didn't mean to use a Unicode property, escape the C<\p>, either
by C<\\p> (just the C<\p>) or by C<\Q\p> (the rest of the string, until
possible C<\E>).
-=item Can't fork
+=item Can't fork: %s
(F) A fatal error occurred while trying to fork while opening a
pipeline.
+=item Can't fork, trying again in 5 seconds
+
+(W pipe) A fork in a piped open failed with EAGAIN and will be retried
+after five seconds.
+
=item Can't get filespec - stale stat buffer?
(S) A warning peculiar to VMS. This arises because of the difference
@@ -1037,11 +1024,6 @@ to reopen it to accept binary data. Alas, it failed.
to a subroutine reference): no such method callable via the package. If
method name is C<???>, this is an internal error.
-=item Can't reswap uid and euid
-
-(P) The setreuid() call failed for some reason in the setuid emulator of
-suidperl.
-
=item Can't return %s from lvalue subroutine
(F) Perl detected an attempt to return illegal lvalues (such as
@@ -1066,11 +1048,6 @@ list context.
(P) For some reason you can't fstat() the script even though you have it
open already. Bizarre.
-=item Can't swap uid and euid
-
-(P) The setreuid() call failed for some reason in the setuid emulator of
-suidperl.
-
=item Can't take log of %g
(F) For ordinary real numbers, you can't take the logarithm of a
@@ -3292,10 +3269,6 @@ the problem, however, you will get the same error message each time
you run Perl. How to really fix the problem can be found in
L<perllocale> section B<LOCALE PROBLEMS>.
-=item Permission denied
-
-(F) The setuid emulator in suidperl decided you were up to no good.
-
=item pid %x not a child
(W exec) A warning peculiar to VMS. Waitpid() was asked to wait for a
@@ -3720,11 +3693,6 @@ as a list, you need to look into how references work, because Perl will
not magically convert between scalars and lists for you. See
L<perlref>.
-=item Script is not setuid/setgid in suidperl
-
-(F) Oddly, the suidperl program was invoked on a script without a setuid
-or setgid bit set. This doesn't make much sense.
-
=item Search pattern not terminated
(F) The lexer couldn't find the final delimiter of a // or m{}
@@ -4012,11 +3980,6 @@ length of the string. See L<perlfunc/substr>. This warning is fatal if
substr is used in an lvalue context (as the left hand side of an
assignment or as a subroutine argument for example).
-=item suidperl is no longer needed since %s
-
-(F) Your Perl was compiled with B<-D>SETUID_SCRIPTS_ARE_SECURE_NOW, but
-a version of the setuid emulator somehow got run anyway.
-
=item sv_upgrade from type %d down to type %d
(P) Perl tried to force the upgrade an SV to a type which was actually
@@ -4777,6 +4740,15 @@ In code that currently says C<use AutoLoader; @ISA = qw(AutoLoader);>
you should remove AutoLoader from @ISA and change C<use AutoLoader;> to
C<use AutoLoader 'AUTOLOAD';>.
+=item Use of octal value above 377 is deprecated
+
+(D deprecated, W regexp) There is a constant in the regular expression whose
+value is interpeted by Perl as octal and larger than 377 (255 decimal, 0xFF
+hex). Perl may take this to mean different things depending on the rest of
+the regular expression. If you meant such an octal value, convert it to
+hexadecimal and use C<\xHH> or C<\x{HH}> instead. If you meant to have
+part of it mean a backreference, use C<\g> for that. See L<perlre>.
+
=item Use of %s in printf format not supported
(F) You attempted to use a feature of printf that is accessible from
diff --git a/pod/perlembed.pod b/pod/perlembed.pod
index 2466531255..39364eb429 100644
--- a/pod/perlembed.pod
+++ b/pod/perlembed.pod
@@ -325,15 +325,15 @@ the first, a C<float> from the second, and a C<char *> from the third.
/** Treat $a as an integer **/
eval_pv("$a = 3; $a **= 2", TRUE);
- printf("a = %d\n", SvIV(get_sv("a", FALSE)));
+ printf("a = %d\n", SvIV(get_sv("a", 0)));
/** Treat $a as a float **/
eval_pv("$a = 3.14; $a **= 2", TRUE);
- printf("a = %f\n", SvNV(get_sv("a", FALSE)));
+ printf("a = %f\n", SvNV(get_sv("a", 0)));
/** Treat $a as a string **/
eval_pv("$a = 'rekcaH lreP rehtonA tsuJ'; $a = reverse($a);", TRUE);
- printf("a = %s\n", SvPV_nolen(get_sv("a", FALSE)));
+ printf("a = %s\n", SvPV_nolen(get_sv("a", 0)));
perl_destruct(my_perl);
perl_free(my_perl);
@@ -457,7 +457,7 @@ been wrapped here):
retval = my_eval_sv(command, TRUE);
SvREFCNT_dec(command);
- *string = get_sv("string", FALSE);
+ *string = get_sv("string", 0);
return SvIV(retval);
}
@@ -480,7 +480,7 @@ been wrapped here):
my_eval_sv(command, TRUE);
SvREFCNT_dec(command);
- *match_list = get_av("array", FALSE);
+ *match_list = get_av("array", 0);
num_matches = av_len(*match_list) + 1; /** assume $[ is 0 **/
return num_matches;
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 8ba3243635..f8d2282d51 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -4621,7 +4621,7 @@ A reference to a subroutine. If there is no filehandle (previous item),
then this subroutine is expected to generate one line of source code per
call, writing the line into C<$_> and returning 1, then returning 0 at
"end of file". If there is a filehandle, then the subroutine will be
-called to act a simple source filter, with the line as read in C<$_>.
+called to act as a simple source filter, with the line as read in C<$_>.
Again, return 1 for each valid line, and 0 after all lines have been
returned.
@@ -4675,7 +4675,7 @@ into package C<main>.) Here is a typical code layout:
}
# In the main program
- push @INC, new Foo(...);
+ push @INC, Foo->new(...);
Note that these hooks are also permitted to set the %INC entry
corresponding to the files they have loaded. See L<perlvar/%INC>.
diff --git a/pod/perlglossary.pod b/pod/perlglossary.pod
index d22e2ac6ec..f0240b0c9e 100644
--- a/pod/perlglossary.pod
+++ b/pod/perlglossary.pod
@@ -1457,6 +1457,9 @@ invocant between the method and its arguments:
give $gollum "Fisssssh!";
give $gollum "Precious!";
+In modern Perl, calling methods this way is often considered bad practice and
+to be avoided.
+
=item indirect object slot
The syntactic position falling between a method call and its arguments
diff --git a/pod/perlguts.pod b/pod/perlguts.pod
index 3ce60d0599..6408e87422 100644
--- a/pod/perlguts.pod
+++ b/pod/perlguts.pod
@@ -191,7 +191,7 @@ have "magic". See L<Magic Virtual Tables> later in this document.
If you know the name of a scalar variable, you can get a pointer to its SV
by using the following:
- SV* get_sv("package::varname", FALSE);
+ SV* get_sv("package::varname", 0);
This returns NULL if the variable does not exist.
@@ -367,7 +367,7 @@ then nothing is done.
If you know the name of an array variable, you can get a pointer to its AV
by using the following:
- AV* get_av("package::varname", FALSE);
+ AV* get_av("package::varname", 0);
This returns NULL if the variable does not exist.
@@ -442,7 +442,7 @@ specified below.
If you know the name of a hash variable, you can get a pointer to its HV
by using the following:
- HV* get_hv("package::varname", FALSE);
+ HV* get_hv("package::varname", 0);
This returns NULL if the variable does not exist.
@@ -667,9 +667,9 @@ to write:
To create a new Perl variable with an undef value which can be accessed from
your Perl script, use the following routines, depending on the variable type.
- SV* get_sv("package::varname", TRUE);
- AV* get_av("package::varname", TRUE);
- HV* get_hv("package::varname", TRUE);
+ SV* get_sv("package::varname", GV_ADD);
+ AV* get_av("package::varname", GV_ADD);
+ HV* get_hv("package::varname", GV_ADD);
Notice the use of TRUE as the second parameter. The new variable can now
be set, using the routines appropriate to the data type.
@@ -878,7 +878,7 @@ following code:
extern int dberror;
extern char *dberror_list;
- SV* sv = get_sv("dberror", TRUE);
+ SV* sv = get_sv("dberror", GV_ADD);
sv_setiv(sv, (IV) dberror);
sv_setpv(sv, dberror_list[dberror]);
SvIOK_on(sv);
diff --git a/pod/perlipc.pod b/pod/perlipc.pod
index de6ba581e6..416ded5605 100644
--- a/pod/perlipc.pod
+++ b/pod/perlipc.pod
@@ -126,7 +126,7 @@ signal handlers like this:
sub REAPER {
$waitedpid = wait;
- # loathe sysV: it makes us not only reinstate
+ # loathe SysV: it makes us not only reinstate
# the handler, but place it after the wait
$SIG{CHLD} = \&REAPER;
}
@@ -145,7 +145,7 @@ or better still:
while (($child = waitpid(-1,WNOHANG)) > 0) {
$Kid_Status{$child} = $?;
}
- $SIG{CHLD} = \&REAPER; # still loathe sysV
+ $SIG{CHLD} = \&REAPER; # still loathe SysV
}
$SIG{CHLD} = \&REAPER;
# do something that forks...
@@ -933,7 +933,7 @@ go back to service a new client.
while ((my $pid = waitpid(-1,WNOHANG)) > 0 && WIFEXITED($?)) {
logmsg "reaped $waitedpid" . ($? ? " with exit $?" : '');
}
- $SIG{CHLD} = \&REAPER; # loathe sysV
+ $SIG{CHLD} = \&REAPER; # loathe SysV
}
$SIG{CHLD} = \&REAPER;
@@ -1115,7 +1115,7 @@ to be on the localhost, and thus everything works right.
while (($waitedpid = waitpid(-1,WNOHANG)) > 0) {
logmsg "reaped $waitedpid" . ($? ? " with exit $?" : '');
}
- $SIG{CHLD} = \&REAPER; # loathe sysV
+ $SIG{CHLD} = \&REAPER; # loathe SysV
}
$SIG{CHLD} = \&REAPER;
diff --git a/pod/perlothrtut.pod b/pod/perlothrtut.pod
index 3253097ec0..e0d69c5059 100644
--- a/pod/perlothrtut.pod
+++ b/pod/perlothrtut.pod
@@ -607,10 +607,10 @@ this:
sleep 10;
$DataQueue->enqueue(undef);
-You create the queue with new Thread::Queue. Then you can add lists of
-scalars onto the end with enqueue(), and pop scalars off the front of
-it with dequeue(). A queue has no fixed size, and can grow as needed
-to hold everything pushed on to it.
+You create the queue with C<< Thread::Queue->new >>. Then you can add
+lists of scalars onto the end with enqueue(), and pop scalars off the
+front of it with dequeue(). A queue has no fixed size, and can grow as
+needed to hold everything pushed on to it.
If a queue is empty, dequeue() blocks until another thread enqueues
something. This makes queues ideal for event loops and other
@@ -740,10 +740,10 @@ it. A more elaborate example looks like this:
use Thread qw(yield);
- new Thread \&thread_sub, 1;
- new Thread \&thread_sub, 2;
- new Thread \&thread_sub, 3;
- new Thread \&thread_sub, 4;
+ Thread->new(\&thread_sub, 1);
+ Thread->new(\&thread_sub, 2);
+ Thread->new(\&thread_sub, 3);
+ Thread->new(\&thread_sub, 4);
sub sync_sub :locked {
my $CallingThread = shift @_;
@@ -790,7 +790,7 @@ method attribute indicates whether the subroutine is really a method.
}
foreach my $thrnum (1..10) {
- new Thread \&tester, $thrnum;
+ Thread->new(\&tester, $thrnum);
}
package Foo;
diff --git a/pod/perlrepository.pod b/pod/perlrepository.pod
index d282c020c5..ecd7978dcb 100644
--- a/pod/perlrepository.pod
+++ b/pod/perlrepository.pod
@@ -50,7 +50,7 @@ that you can push back on with:
git clone ssh://perl5.git.perl.org/gitroot/perl.git perl-ssh
-This clones the repository and makes a local copy in the 'perl-ssh'
+This clones the repository and makes a local copy in the F<perl-ssh>
directory.
If you clone using git, which is faster than ssh, then you will need to
@@ -193,7 +193,7 @@ This shows that there were changes to this document staged for commit,
and that there were further changes in the working directory not yet
staged. It also shows that there was an untracked file in the working
directory, and as you can see shows how to change all of this. It also
-shows that there is one commit on the working branch C<blead> which
+shows that there is one commit on the working branch C<blead> which
has not been pushed to the C<origin> remote yet. B<NOTE>: that this
output is also what you see as a template if you do not provide a
message to C<git commit>.
diff --git a/pod/perlsec.pod b/pod/perlsec.pod
index 59980d6a86..05d95887d5 100644
--- a/pod/perlsec.pod
+++ b/pod/perlsec.pod
@@ -352,11 +352,7 @@ changed, especially if you have symbolic links on your system.
Fortunately, sometimes this kernel "feature" can be disabled.
Unfortunately, there are two ways to disable it. The system can simply
outlaw scripts with any set-id bit set, which doesn't help much.
-Alternately, it can simply ignore the set-id bits on scripts. If the
-latter is true, Perl can emulate the setuid and setgid mechanism when it
-notices the otherwise useless setuid/gid bits on Perl scripts. It does
-this via a special executable called F<suidperl> that is automatically
-invoked for you if it's needed.
+Alternately, it can simply ignore the set-id bits on scripts.
However, if the kernel set-id script feature isn't disabled, Perl will
complain loudly that your set-id script is insecure. You'll need to
@@ -387,9 +383,6 @@ program that builds Perl tries to figure this out for itself, so you
should never have to specify this yourself. Most modern releases of
SysVr4 and BSD 4.4 use this approach to avoid the kernel race condition.
-Prior to release 5.6.1 of Perl, bugs in the code of F<suidperl> could
-introduce a security hole.
-
=head2 Protecting Your Programs
There are a number of ways to hide the source to your Perl programs,
diff --git a/pod/perltodo.pod b/pod/perltodo.pod
index 31c0931af3..440cae1514 100644
--- a/pod/perltodo.pod
+++ b/pod/perltodo.pod
@@ -4,11 +4,14 @@ perltodo - Perl TO-DO List
=head1 DESCRIPTION
-This is a list of wishes for Perl. The tasks we think are smaller or
-easier are listed first. Anyone is welcome to work on any of these,
-but it's a good idea to first contact I<perl5-porters@perl.org> to
-avoid duplication of effort, and to learn from any previous attempts.
-By all means contact a pumpking privately first if you prefer.
+This is a list of wishes for Perl. The most up to date version of this file
+is at http://perl5.git.perl.org/perl.git/blob_plain/HEAD:/pod/perltodo.pod
+
+The tasks we think are smaller or easier are listed first. Anyone is welcome
+to work on any of these, but it's a good idea to first contact
+I<perl5-porters@perl.org> to avoid duplication of effort, and to learn from
+any previous attempts. By all means contact a pumpking privately first if you
+prefer.
Whilst patches to make the list shorter are most welcome, ideas to add to
the list are also encouraged. Check the perl5-porters archives for past
@@ -879,12 +882,6 @@ program if you pass the process ID. It would be good to do this with the Perl
debugger on a running Perl program, although I'm not sure how it would be
done." ssh and screen do this with named pipes in /tmp. Maybe we can too.
-=head2 Optimize away empty destructors
-
-Defining an empty DESTROY method might be useful (notably in
-AUTOLOAD-enabled classes), but it's still a bit expensive to call. That
-could probably be optimized.
-
=head2 LVALUE functions for lists
The old perltodo notes that lvalue functions don't work for list or hash