there are still more that need to be fixed i think, but do we really
care about these at all? they're pretty much only useful for
informational purposes, i don't think there's any way to actually
trigger this codepath
subtype 'Str'
=> as 'Value'
- => where { ref(\$_) eq 'SCALAR' }
+ => where { ref(\$_) eq 'SCALAR' || ref(\(my $val = $_)) eq 'SCALAR' }
=> inline_as {
'defined(' . $_[1] . ') '
. '&& (ref(\\' . $_[1] . ') eq "SCALAR"'
subtype 'Int'
=> as 'Num'
- => where { "$_" =~ /\A-?[0-9]+\z/ }
+ => where { (my $val = $_) =~ /\A-?[0-9]+\z/ }
=> inline_as {
'defined(' . $_[1] . ') '
. '&& !ref(' . $_[1] . ') '