varspec->type = string_to_vartype(SvPV_nolen(HeVAL(val)));
}
+static void _check_varspec_is_valid(varspec_t *varspec)
+{
+ if (strstr(SvPV_nolen(varspec->name), "::")) {
+ croak("Variable names may not contain ::");
+ }
+}
+
static int _valid_for_type(SV *value, vartype_t type)
{
svtype sv_type = SvROK(value) ? SvTYPE(SvRV(value)) : SVt_NULL;
_deconstruct_variable_hash((HV*)SvRV($arg), &$var);
else
croak(\"varspec must be a string or a hashref\");
+ _check_varspec_is_valid(&$var);
T_VARTYPE
if (!SvPOK($arg))