summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cop.h29
-rw-r--r--pod/perlcall.pod14
2 files changed, 14 insertions, 29 deletions
diff --git a/cop.h b/cop.h
index 49f1d0c12c..c811eb0ec4 100644
--- a/cop.h
+++ b/cop.h
@@ -937,35 +937,6 @@ struct context {
#define CXINC (cxstack_ix < cxstack_max ? ++cxstack_ix : (cxstack_ix = cxinc()))
-/*
-=for apidoc AmnU||G_SCALAR
-Used to indicate scalar context. See C<L</GIMME_V>>, C<L</GIMME>>, and
-L<perlcall>.
-
-=for apidoc AmnU||G_ARRAY
-Used to indicate list context. See C<L</GIMME_V>>, C<L</GIMME>> and
-L<perlcall>.
-
-=for apidoc AmnU||G_VOID
-Used to indicate void context. See C<L</GIMME_V>> and L<perlcall>.
-
-=for apidoc AmnU||G_DISCARD
-Indicates that arguments returned from a callback should be discarded. See
-L<perlcall>.
-
-=for apidoc AmnU||G_EVAL
-
-Used to force a Perl C<eval> wrapper around a callback. See
-L<perlcall>.
-
-=for apidoc AmnU||G_NOARGS
-
-Indicates that no arguments are being sent to a callback. See
-L<perlcall>.
-
-=cut
-*/
-
#define G_SCALAR 2
#define G_ARRAY 3
#define G_VOID 1
diff --git a/pod/perlcall.pod b/pod/perlcall.pod
index b27ef2d0da..e7c4a76681 100644
--- a/pod/perlcall.pod
+++ b/pod/perlcall.pod
@@ -129,6 +129,8 @@ with a bit mask of any combination of the other G_* symbols defined below.
=head2 G_VOID
+=for apidoc AmnUh||G_VOID
+
Calls the Perl subroutine in a void context.
This flag has 2 effects:
@@ -154,6 +156,8 @@ be 0.
=head2 G_SCALAR
+=for apidoc AmnUh||G_SCALAR
+
Calls the Perl subroutine in a scalar context. This is the default
context flag setting for all the I<call_*> functions.
@@ -194,6 +198,8 @@ Context> shows an example of this behavior.
=head2 G_ARRAY
+=for apidoc AmnUh||G_ARRAY
+
Calls the Perl subroutine in a list context.
As with G_SCALAR, this flag has 2 effects:
@@ -225,6 +231,8 @@ Perl stack.
=head2 G_DISCARD
+=for apidoc AmnUh||G_DISCARD
+
By default, the I<call_*> functions place the items returned from
by the Perl subroutine on the stack. If you are not interested in
these items, then setting this flag will make Perl get rid of them
@@ -241,6 +249,8 @@ can ignore the problem and let Perl deal with it for you.
=head2 G_NOARGS
+=for apidoc AmnUh||G_NOARGS
+
Whenever a Perl subroutine is called using one of the I<call_*>
functions, it is assumed by default that parameters are to be passed to
the subroutine. If you are not passing any parameters to the Perl
@@ -277,6 +287,8 @@ belongs to C<joe>.
=head2 G_EVAL
+=for apidoc AmnUh||G_EVAL
+
It is possible for the Perl subroutine you are calling to terminate
abnormally, e.g., by calling I<die> explicitly or by not actually
existing. By default, when either of these events occurs, the
@@ -321,6 +333,8 @@ See L</Using G_EVAL> for details on using G_EVAL.
=head2 G_KEEPERR
+=for apidoc AmnUh||G_KEEPERR
+
Using the G_EVAL flag described above will always set C<$@>: clearing
it if there was no error, and setting it to describe the error if there
was an error in the called code. This is what you want if your intention