7 static bool ck_sv_defined(SV*);
8 static bool ck_sv_is_ref(SV*);
9 static bool ck_sv_ref_type(SV*, int);
12 ck_sv_defined(SV* value){
13 return SvOK(value) ? 1 : 0;
17 ck_sv_is_ref(SV* value){
19 if( ck_sv_defined(value) && SvROK(value) ){
26 ck_sv_ref_type(SV* value, int sv_type){
28 if( ck_sv_is_ref(value) && SvTYPE( SvRV(value) ) == sv_type){
35 MODULE = Moose PACKAGE = Moose::Util::TypeConstraints::OptimizedConstraints
43 RETVAL = !ck_sv_defined(value);
51 RETVAL = ck_sv_defined(value);
61 RETVAL = (ck_sv_defined(value) && !ck_sv_is_ref(value)) ? 1 : 0;
69 RETVAL = (ck_sv_defined(value) && !ck_sv_is_ref(value)) ? 1 : 0;
77 RETVAL = ck_sv_is_ref(value);
87 SvOK(value) && SvROK(value)
89 int type = SvTYPE(SvRV(value));
106 RETVAL = ck_sv_ref_type(value, SVt_PVAV);
114 RETVAL = (ck_sv_ref_type(value, SVt_PVHV) && !sv_isobject(value)) ? 1 : 0;
122 RETVAL = ck_sv_ref_type(value, SVt_PVCV);
130 RETVAL = ck_sv_ref_type(value, SVt_PVGV);
138 char *regclass = "Regexp";
141 if( ck_sv_is_ref(value)
142 && sv_isobject(value)
143 && !sv_isa(value, regclass)
154 char *regclass = "Regexp";
157 if( ck_sv_is_ref(value)
158 && sv_isobject(value)
159 && sv_isa(value, regclass)