X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlintern.pod;h=50f3d51af949f34b3e9115ef951b818086c9d2f7;hb=8a2485f87de4ac33d6c8564ae6b27c5efc3e1430;hp=41ddbbad37d02cc2fd5a956a1065070193191c01;hpb=5c3943b6e9c69b628b00a6d2e7f5e1ac3f2ac312;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlintern.pod b/pod/perlintern.pod index 41ddbba..50f3d51 100644 --- a/pod/perlintern.pod +++ b/pod/perlintern.pod @@ -221,6 +221,15 @@ the previous current pad. =for hackers Found in file pad.h +=item PAD_SET_CUR_NOSAVE + +like PAD_SET_CUR, but without the save + + void PAD_SET_CUR_NOSAVE (PADLIST padlist, I32 n) + +=for hackers +Found in file pad.h + =item PAD_SV Get the value at offset C in the current pad @@ -288,7 +297,7 @@ Locate the CV corresponding to the currently executing sub or eval. If db_seqp is non_null, skip CVs that are in the DB package and populate *db_seqp with the cop sequence number at the point that the DB:: code was entered. (allows debuggers to eval in the scope of the breakpoint rather -than in in the scope of the debuger itself). +than in in the scope of the debugger itself). CV* find_runcv(U32 *db_seqp) @@ -492,6 +501,12 @@ become so if C is implemented.) Note that formats are treated as anon subs, and are cloned each time write is called (if necessary). +The flag SVf_PADSTALE is cleared on lexicals each time the my() is executed, +and set on scope exit. This allows the 'Variable $x is not available' warning +to be generated in evals, such as + + { my $x = 1; sub f { eval '$x'} } f(); + AV * CvPADLIST(CV *cv) =for hackers @@ -776,11 +791,32 @@ Found in file pp.h =over 8 +=item find_uninit_var + +Find the name of the undefined variable (if any) that caused the operator o +to issue a "Use of uninitialized value" warning. +If match is true, only return a name if it's value matches uninit_sv. +So roughly speaking, if a unary operator (such as OP_COS) generates a +warning, then following the direct child of the op may yield an +OP_PADSV or OP_GV that gives the name of the undefined variable. On the +other hand, with OP_ADD there are two branches to follow, so we only print +the variable name if we get an exact match. + +The name is returned as a mortal SV. + +Assumes that PL_op is the op that originally triggered the error, and that +PL_comppad/PL_curpad points to the currently executing pad. + + SV* find_uninit_var(OP* obase, SV* uninit_sv, bool top) + +=for hackers +Found in file sv.c + =item report_uninit Print appropriate "Use of uninitialized variable" warning - void report_uninit() + void report_uninit(SV* uninit_sv) =for hackers Found in file sv.c