diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-09-05 00:03:32 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-09-05 05:59:10 -0700 |
commit | f3c4ec28530201b30fc282f852ced5fc755e8e38 (patch) | |
tree | 97ae49bf0707e6fc38c097bbc860eabfc9cb690b /pod/perlguts.pod | |
parent | 665ff1e94e3997c05f0fa23160fbd8fe871a8f96 (diff) | |
download | perl-f3c4ec28530201b30fc282f852ced5fc755e8e38.tar.gz |
Update perlguts for NULL in AVs
Diffstat (limited to 'pod/perlguts.pod')
-rw-r--r-- | pod/perlguts.pod | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pod/perlguts.pod b/pod/perlguts.pod index ac9224cb70..95ed148308 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -534,12 +534,14 @@ is equivalent to this Perl code: my @av; $av[0] = undef; -Unfortunately, this isn't true. AVs use C<&PL_sv_undef> as a marker +Unfortunately, this isn't true. In perl 5.18 and earlier, AVs use C<&PL_sv_undef> as a marker for indicating that an array element has not yet been initialized. Thus, C<exists $av[0]> would be true for the above Perl code, but -false for the array generated by the XS code. +false for the array generated by the XS code. In perl 5.20, storing +&PL_sv_undef will create a read-only element, because the scalar +&PL_sv_undef itself is stored, not a copy. -Other problems can occur when storing C<&PL_sv_undef> in HVs: +Similar problems can occur when storing C<&PL_sv_undef> in HVs: hv_store( hv, "key", 3, &PL_sv_undef, 0 ); |