switch (type) {
case VAR_SCALAR:
+ /* XXX: something weird is going on here - apparently values can
+ * be SVt_NULL but also be SvROK (and also, SVt_NULL isn't SvOK) */
+ if (sv_type == SVt_NULL)
+ return 1;
return SvROK(value) ? SvOK(SvRV(value)) : SvOK(value);
case VAR_ARRAY:
return sv_type == SVt_PVAV;
--- /dev/null
+package CompileTime;
+use strict;
+use warnings;
+
+use Package::Stash;
+
+our $foo = 23;
+
+BEGIN {
+ my $stash = Package::Stash->new(__PACKAGE__);
+ $stash->add_symbol('$bar', $foo);
+ $stash->add_symbol('$baz', $stash->get_symbol('$foo'));
+}
+
+1;