The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

SvPV_nolen sv_2pv_nolen SvPVbyte sv_2pvbyte sv_pvn sv_pvn_force

#ifndef SvPV_nolen

#if { NEED sv_2pv_nolen }

char * sv_2pv_nolen(pTHX_ register SV *sv) { STRLEN n_a; return sv_2pv(sv, &n_a); }

#endif

/* Hint: sv_2pv_nolen * Use the SvPV_nolen() macro instead of sv_2pv_nolen(). */

/* SvPV_nolen depends on sv_2pv_nolen */ #define SvPV_nolen(sv) \ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ? SvPVX(sv) : sv_2pv_nolen(sv))

#endif

#ifdef SvPVbyte

/* Hint: SvPVbyte * Does not work in perl-5.6.1, ppport.h implements a version * borrowed from perl-5.7.3. */

#if { VERSION < 5.7.0 }

#if { NEED sv_2pvbyte }

char * sv_2pvbyte(pTHX_ register SV *sv, STRLEN *lp) { sv_utf8_downgrade(sv,0); return SvPV(sv,*lp); }

#endif

/* Hint: sv_2pvbyte * Use the SvPVbyte() macro instead of sv_2pvbyte(). */

#undef SvPVbyte

/* SvPVbyte depends on sv_2pvbyte */ #define SvPVbyte(sv, lp) \ ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvbyte(sv, &lp))

#endif

#else

# define SvPVbyte SvPV # define sv_2pvbyte sv_2pv

#endif

/* sv_2pvbyte_nolen depends on sv_2pv_nolen */ __UNDEFINED__ sv_2pvbyte_nolen sv_2pv_nolen

/* Hint: sv_pvn * Always use the SvPV() macro instead of sv_pvn(). */ __UNDEFINED__ sv_pvn(sv, len) SvPV(sv, len)

/* Hint: sv_pvn_force * Always use the SvPV_force() macro instead of sv_pvn_force(). */ __UNDEFINED__ sv_pvn_force(sv, len) SvPV_force(sv, len)

#define NEED_sv_2pv_nolen #define NEED_sv_2pvbyte

IV SvPVbyte(sv) SV *sv PREINIT: STRLEN len; const char *str; CODE: str = SvPVbyte(sv, len); RETVAL = strEQ(str, "mhx") ? len : -1; OUTPUT: RETVAL

IV SvPV_nolen(sv) SV *sv PREINIT: const char *str; CODE: str = SvPV_nolen(sv); RETVAL = strEQ(str, "mhx") ? 42 : 0; OUTPUT: RETVAL

ok(&Devel::PPPort::SvPVbyte("mhx"), 3); ok(&Devel::PPPort::SvPV_nolen("mhx"), 42);

5 POD Errors

The following errors were encountered while parsing the POD:

Around line 18:

Unknown directive: =provides

Around line 27:

Unknown directive: =implementation

Around line 106:

Unknown directive: =xsinit

Around line 111:

Unknown directive: =xsubs

Around line 136:

Unknown directive: =tests