Devel-PPPort
view release on metacpan or search on metacpan
parts/inc/SvPV view on Meta::CPAN
CODE:
str = SvPV_nolen_const(sv);
RETVAL = strEQ(str, "mhx") ? 57 : 0;
OUTPUT:
RETVAL
IV
SvPV_nomg(sv)
SV *sv
PREINIT:
char *str;
STRLEN len;
CODE:
str = SvPV_nomg(sv, len);
RETVAL = len + (strEQ(str, "mhx") ? 55 : 0);
OUTPUT:
RETVAL
IV
SvPV_nomg_const(sv)
SV *sv
PREINIT:
const char *str;
STRLEN len;
CODE:
str = SvPV_nomg_const(sv, len);
RETVAL = len + (strEQ(str, "mhx") ? 56 : 0);
OUTPUT:
RETVAL
IV
SvPV_nomg_const_nolen(sv)
SV *sv
PREINIT:
const char *str;
CODE:
str = SvPV_nomg_const_nolen(sv);
RETVAL = strEQ(str, "mhx") ? 60 : 0;
OUTPUT:
RETVAL
IV
SvPV_nomg_nolen(sv)
SV *sv
PREINIT:
char *str;
CODE:
str = SvPV_nomg_nolen(sv);
RETVAL = strEQ(str, "mhx") ? 61 : 0;
OUTPUT:
RETVAL
void
SvPV_renew(sv, nlen, insv)
SV *sv
STRLEN nlen
SV *insv
PREINIT:
STRLEN slen;
const char *str;
PPCODE:
str = SvPV_const(insv, slen);
XPUSHs(sv);
mXPUSHi(SvLEN(sv));
SvPV_renew(sv, nlen);
Copy(str, SvPVX(sv), slen + 1, char);
SvCUR_set(sv, slen);
mXPUSHi(SvLEN(sv));
void
SvPVCLEAR(sv)
SV *sv
CODE:
SvPVCLEAR(sv);
=tests plan => 50
my $mhx = "mhx";
is(&Devel::PPPort::SvPVbyte($mhx), 3);
my $i = 42;
is(&Devel::PPPort::SvPV_nolen($mhx), $i++);
is(&Devel::PPPort::SvPV_const($mhx), $i++);
is(&Devel::PPPort::SvPV_mutable($mhx), $i++);
is(&Devel::PPPort::SvPV_flags($mhx), $i++);
is(&Devel::PPPort::SvPV_flags_const($mhx), $i++);
is(&Devel::PPPort::SvPV_flags_const_nolen($mhx), $i++);
is(&Devel::PPPort::SvPV_flags_mutable($mhx), $i++);
is(&Devel::PPPort::SvPV_force($mhx), $i++);
is(&Devel::PPPort::SvPV_force_nolen($mhx), $i++);
is(&Devel::PPPort::SvPV_force_mutable($mhx), $i++);
is(&Devel::PPPort::SvPV_force_nomg($mhx), $i++);
is(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), $i++);
is(&Devel::PPPort::SvPV_force_flags($mhx), $i++);
is(&Devel::PPPort::SvPV_force_flags_nolen($mhx), $i++);
is(&Devel::PPPort::SvPV_force_flags_mutable($mhx), $i++);
is(&Devel::PPPort::SvPV_nolen_const($mhx), $i++);
is(&Devel::PPPort::SvPV_nomg($mhx), $i++);
is(&Devel::PPPort::SvPV_nomg_const($mhx), $i++);
is(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), $i++);
is(&Devel::PPPort::SvPV_nomg_nolen($mhx), $i++);
$mhx = 42; is(&Devel::PPPort::SvPV_nolen($mhx), 0);
$mhx = 42; is(&Devel::PPPort::SvPV_const($mhx), 2);
$mhx = 42; is(&Devel::PPPort::SvPV_mutable($mhx), 2);
$mhx = 42; is(&Devel::PPPort::SvPV_flags($mhx), 2);
$mhx = 42; is(&Devel::PPPort::SvPV_flags_const($mhx), 2);
$mhx = 42; is(&Devel::PPPort::SvPV_flags_const_nolen($mhx), 0);
$mhx = 42; is(&Devel::PPPort::SvPV_flags_mutable($mhx), 2);
$mhx = 42; is(&Devel::PPPort::SvPV_force($mhx), 2);
$mhx = 42; is(&Devel::PPPort::SvPV_force_nolen($mhx), 0);
$mhx = 42; is(&Devel::PPPort::SvPV_force_mutable($mhx), 2);
$mhx = 42; is(&Devel::PPPort::SvPV_force_nomg($mhx), 2);
( run in 1.180 second using v1.01-cache-2.11-cpan-ff9377addf4 )