X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlguts.pod;h=99c79d0a437e473e2efeaac4ce8dc1b723d74988;hb=85b35914c9f3fc562f8a505e6508276be17f9d70;hp=9932b3754744e7156de4859bd40d8e1ca75e4d0c;hpb=d82b684cd82be03d9cc38309478c329f914280b5;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlguts.pod b/pod/perlguts.pod index 9932b37..99c79d0 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -201,9 +201,22 @@ you can call: SvOK(SV*) The scalar C value is stored in an SV instance called C. -Its address can be used whenever an C is needed. -However, you have to be careful when using C<&PL_sv_undef> as a value in AVs -or HVs (see L). + +Its address can be used whenever an C is needed. Make sure that +you don't try to compare a random sv with C<&PL_sv_undef>. For example +when interfacing Perl code, it'll work correctly for: + + foo(undef); + +But won't work when called as: + + $x = undef; + foo($x); + +So to repeat always use SvOK() to check whether an sv is defined. + +Also you have to be careful when using C<&PL_sv_undef> as a value in +AVs or HVs (see L). There are also the two values C and C, which contain boolean TRUE and FALSE values, respectively. Like C, their