diff options
author | Pali <pali@cpan.org> | 2019-06-17 14:09:08 +0200 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2019-06-19 10:21:36 +1000 |
commit | 3127113cbf175740dce688a3320c9d62ece9b910 (patch) | |
tree | 3014a93c62c1dfa70e6412ac461d87ab87e55b16 /sv.h | |
parent | da1830f5b059251a3031add1d03b8a965ab2c773 (diff) | |
download | perl-3127113cbf175740dce688a3320c9d62ece9b910.tar.gz |
Document SvTRUEx() macro
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1601,10 +1601,21 @@ false. See C<L</SvOK>> for a defined/undefined test. Handles 'get' magic unless the scalar is already C<SvPOK>, C<SvIOK> or C<SvNOK> (the public, not the private flags). +See C<L</SvTRUEx>> for a version which guarantees to evaluate C<sv> only once. + =for apidoc Am|bool|SvTRUE_nomg|SV* sv Returns a boolean indicating whether Perl would evaluate the SV as true or false. See C<L</SvOK>> for a defined/undefined test. Does not handle 'get' magic. +=for apidoc Am|bool|SvTRUEx|SV* sv +Returns a boolean indicating whether Perl would evaluate the SV as true or +false. See C<L</SvOK>> for a defined/undefined test. Handles 'get' magic +unless the scalar is already C<SvPOK>, C<SvIOK> or C<SvNOK> (the public, not the +private flags). + +This form guarantees to evaluate C<sv> only once. Only use this if C<sv> is an +expression with side effects, otherwise use the more efficient C<SvTRUE>. + =for apidoc Am|char*|SvPVutf8_force|SV* sv|STRLEN len Like C<SvPV_force>, but converts C<sv> to UTF-8 first if necessary. |