diff options
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1543,8 +1543,12 @@ Perl_swash_init(pTHX_ char* pkg, char* name, SV *listsv, I32 minbits, I32 none) Copy(pv, PL_tokenbuf, len+1, char); PL_curcop->op_private = PL_hints; } - if (!SvROK(retval) || SvTYPE(SvRV(retval)) != SVt_PVHV) + if (!SvROK(retval) || SvTYPE(SvRV(retval)) != SVt_PVHV) { + if (SvPOK(retval)) + Perl_croak(aTHX_ "Can't find Unicode property definition \"%s\"", + SvPV_nolen(retval)); Perl_croak(aTHX_ "SWASHNEW didn't return an HV ref"); + } return retval; } |