From: Father Chrysostomos Date: Fri, 20 Jan 2012 01:05:58 +0000 (-0800) Subject: Document B::PV’s LEN and CUR methods X-Git-Tag: v5.15.7~25 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/5c1404211888c50c6ce052dae8e0bc6a62d5920d Document B::PV’s LEN and CUR methods --- diff --git a/ext/B/B.pm b/ext/B/B.pm index 36a6dad..66e4999 100644 --- a/ext/B/B.pm +++ b/ext/B/B.pm @@ -755,7 +755,17 @@ length information. It is the appropriate method to use if you need to get the name of a lexical variable from a padname array. Lexical variable names are always stored with a null terminator, and the length field -(SvCUR) is overloaded for other purposes and can't be relied on here. +(CUR) is overloaded for other purposes and can't be relied on here. + +=item CUR + +This method returns the internal length field, which consists of the number +of internal bytes, not necessarily the number of logical characters. + +=item LEN + +This method returns the number of bytes allocated (via malloc) for storing +the string. This is 0 if the scalar does not "own" the string. =back