From: Jesse Luehrs Date: Fri, 5 Aug 2011 18:04:49 +0000 (-0500) Subject: regexprefs are valid scalar refs too X-Git-Tag: 0.31~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bca9865190a06f363601baceeb803d555f55ff77;p=gitmo%2FPackage-Stash.git regexprefs are valid scalar refs too --- diff --git a/lib/Package/Stash/PP.pm b/lib/Package/Stash/PP.pm index fdb8da9..52753c2 100644 --- a/lib/Package/Stash/PP.pm +++ b/lib/Package/Stash/PP.pm @@ -105,7 +105,7 @@ sub _valid_for_type { } else { my $ref = reftype($value); - return !defined($ref) || $ref eq 'SCALAR' || $ref eq 'REF' || $ref eq 'LVALUE'; + return !defined($ref) || $ref eq 'SCALAR' || $ref eq 'REF' || $ref eq 'LVALUE' || $ref eq 'REGEXP'; } }