summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-06-22 01:14:14 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-06-22 01:14:14 +0000
commita2008d6d9087873a23da5012f181cb674dbf4ab1 (patch)
treee0e61a56820ba722535f48599cb94a8dbfbd9ce9
parent7e5428c5eadf5068dae305575a105bd61a84cb5d (diff)
downloadperl-a2008d6d9087873a23da5012f181cb674dbf4ab1.tar.gz
merge relevant portions from maintbranch change#1155
p4raw-link: @1155 on //depot/maint-5.004/perl: c7664d5b6ade225b1576289e62712eec26808f84 p4raw-id: //depot/perl@1186
-rw-r--r--lib/Math/BigFloat.pm2
-rw-r--r--op.c2
-rw-r--r--pod/perlfunc.pod12
-rw-r--r--pod/perlop.pod5
-rw-r--r--pod/perlrun.pod5
-rw-r--r--pp_hot.c8
6 files changed, 27 insertions, 7 deletions
diff --git a/lib/Math/BigFloat.pm b/lib/Math/BigFloat.pm
index 77fb5dd818..576f3410c7 100644
--- a/lib/Math/BigFloat.pm
+++ b/lib/Math/BigFloat.pm
@@ -274,7 +274,7 @@ Math::BigFloat - Arbitrary length float math package
=head1 SYNOPSIS
- use Math::BogFloat;
+ use Math::BigFloat;
$f = Math::BigFloat->new($string);
$f->fadd(NSTR) return NSTR addition
diff --git a/op.c b/op.c
index 472a475312..d39020504c 100644
--- a/op.c
+++ b/op.c
@@ -3383,7 +3383,7 @@ newSUB(I32 floor, OP *o, OP *proto, OP *block)
GV *gv = gv_fetchpv(name ? name : "__ANON__",
GV_ADDMULTI | (block ? 0 : GV_NOINIT), SVt_PVCV);
char *ps = proto ? SvPVx(((SVOP*)proto)->op_sv, na) : Nullch;
- register CV *cv;
+ register CV *cv=0;
I32 ix;
if (o)
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 31367ed07b..bfb1c30577 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -3836,7 +3836,17 @@ the new position.
Does exactly the same thing as "exec LIST" except that a fork is done
first, and the parent process waits for the child process to complete.
Note that argument processing varies depending on the number of
-arguments. The return value is the exit status of the program as
+arguments. If there is more than one argument in LIST, or if LIST is
+an array with more than one value, starts the program given by the
+first element of the list with arguments given by the rest of the list.
+If there is only one scalar argument, the argument is
+checked for shell metacharacters, and if there are any, the entire
+argument is passed to the system's command shell for parsing (this is
+C</bin/sh -c> on Unix platforms, but varies on other platforms). If
+there are no shell metacharacters in the argument, it is split into
+words and passed directly to execvp(), which is more efficient.
+
+The return value is the exit status of the program as
returned by the wait() call. To get the actual exit value divide by
256. See also L</exec>. This is I<NOT> what you want to use to capture
the output from a command, for that you should use merely backticks or
diff --git a/pod/perlop.pod b/pod/perlop.pod
index c534234bdd..0a081b56d1 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -774,9 +774,10 @@ If you change them, Perl won't even notice.
If the PATTERN evaluates to the empty string, the last
I<successfully> matched regular expression is used instead.
-If used in a context that requires a list value, a pattern match returns a
+If the C</g> option is not used, C<m//> in a list context returns a
list consisting of the subexpressions matched by the parentheses in the
-pattern, i.e., (C<$1>, $2, $3...). (Note that here $1 etc. are also set, and
+pattern, i.e., (C<$1>, C<$2>, C<$3>...). (Note that here
+C<$1> etc. are also set, and
that this differs from Perl 4's behavior.) If there are no parentheses,
the return value is the list C<(1)> for success or C<('')> upon failure.
With parentheses, C<()> is returned upon failure.
diff --git a/pod/perlrun.pod b/pod/perlrun.pod
index 72c772e4bb..b0790d7093 100644
--- a/pod/perlrun.pod
+++ b/pod/perlrun.pod
@@ -336,6 +336,11 @@ You can use C<eof> without parentheses to locate the end of each input file,
in case you want to append to each file, or reset line numbering (see
example in L<perlfunc/eof>).
+Finally, note that the B<-i> switch does not impede execution when no
+files are given on the command line. In this case, no backup is made
+(the original file cannot, of course, be determined) and processing
+proceeds from STDIN to STDOUT as might be expected.
+
=item B<-I>I<directory>
Directories specified by B<-I> are prepended to the search path for
diff --git a/pp_hot.c b/pp_hot.c
index 9fbd176bf4..0133085722 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1027,8 +1027,11 @@ do_readline(void)
IoFLAGS(io) &= ~IOf_START;
IoLINES(io) = 0;
if (av_len(GvAVn(last_in_gv)) < 0) {
- SV *tmpstr = newSVpv("-", 1); /* assume stdin */
- av_push(GvAVn(last_in_gv), tmpstr);
+ do_open(last_in_gv,"-",1,FALSE,0,0,Nullfp);
+ sv_setpvn(GvSV(last_in_gv), "-", 1);
+ SvSETMAGIC(GvSV(last_in_gv));
+ fp = IoIFP(io);
+ goto have_fp;
}
}
fp = nextargv(last_in_gv);
@@ -1176,6 +1179,7 @@ do_readline(void)
}
RETURN;
}
+ have_fp:
if (gimme == G_SCALAR) {
sv = TARG;
if (SvROK(sv))