break;
case 'e':
if (memEQ(name, "uniqu", 5)) {
- if (SvTYPE(sv) == SVt_PVGV) {
+ if (isGV_with_GP(sv)) {
if (negated) {
GvUNIQUE_off(sv);
} else {
{
dVAR;
dXSARGS;
- PERL_UNUSED_ARG(cv);
if( items > 1 )
- Perl_croak(aTHX_ "Usage: attributes::bootstrap $module");
+ croak_xs_usage(cv, "$module");
newXS("attributes::_modify_attrs", XS_attributes__modify_attrs, file);
newXSproto("attributes::_guess_stash", XS_attributes__guess_stash, file, "$");
dVAR;
dXSARGS;
SV *rv, *sv;
- PERL_UNUSED_ARG(cv);
if (items < 1) {
usage:
- Perl_croak(aTHX_
- "Usage: attributes::_modify_attrs $reference, @attributes");
+ croak_xs_usage(cv, "@attributes");
}
rv = ST(0);
dXSARGS;
SV *rv, *sv;
cv_flags_t cvflags;
- PERL_UNUSED_ARG(cv);
if (items != 1) {
usage:
- Perl_croak(aTHX_
- "Usage: attributes::_fetch_attrs $reference");
+ croak_xs_usage(cv, "$reference");
}
rv = ST(0);
XPUSHs(newSVpvs_flags("unique", SVs_TEMP));
break;
case SVt_PVGV:
- if (GvUNIQUE(sv))
+ if (isGV_with_GP(sv) && GvUNIQUE(sv))
XPUSHs(newSVpvs_flags("unique", SVs_TEMP));
break;
default:
dXSARGS;
SV *rv, *sv;
dXSTARG;
- PERL_UNUSED_ARG(cv);
if (items != 1) {
usage:
- Perl_croak(aTHX_
- "Usage: attributes::_guess_stash $reference");
+ croak_xs_usage(cv, "$reference");
}
rv = ST(0);
stash = CvSTASH(sv);
break;
case SVt_PVGV:
- if (GvGP(sv) && GvESTASH((GV*)sv))
+ if (isGV_with_GP(sv) && GvGP(sv) && GvESTASH((GV*)sv))
stash = GvESTASH((GV*)sv);
break;
default:
dXSARGS;
SV *rv, *sv;
dXSTARG;
- PERL_UNUSED_ARG(cv);
if (items != 1) {
usage:
- Perl_croak(aTHX_
- "Usage: attributes::reftype $reference");
+ croak_xs_usage(cv, "$reference");
}
rv = ST(0);