=for hackers
Found in file gv.h
+=item gv_const_sv
+X<gv_const_sv>
+
+If C<gv> is a typeglob whose subroutine entry is a constant sub eligible for
+inlining, or C<gv> is a placeholder reference that would be promoted to such
+a typeglob, then returns the value returned by the sub. Otherwise, returns
+NULL.
+
+ SV* gv_const_sv(GV* gv)
+
+=for hackers
+Found in file gv.c
+
=item gv_fetchmeth
X<gv_fetchmeth>
Using various gambits, try to get a CV from an SV; in addition, try if
possible to set C<*st> and C<*gvp> to the stash and GV associated with it.
+The flags in C<lref> are passed to sv_fetchsv.
CV* sv_2cv(SV* sv, HV** st, GV** gvp, I32 lref)
when (undef) {
say '$foo is undefined';
}
-
+
when ("foo") {
say '$foo is the string "foo"';
}
when ([1,3,5,7,9]) {
say '$foo is an odd digit';
continue; # Fall through
- }
-
+ }
+
when ($_ < 100) {
say '$foo is numerically less than 100';
}
when (\&complicated_check) {
say 'complicated_check($foo) is true';
}
-
+
default {
die q(I don't know what to do with $foo);
}