diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-01-03 23:31:08 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-01-03 23:31:08 -0600 |
commit | db7c38b0b0dcd88368ad5b88df89772f63292386 (patch) | |
tree | 2a58818856e7a05707d3c1bbb225c5c924f55376 /XS.xs | |
parent | 90d87eb423c9e8dc48b9633bd7e884505ba9869a (diff) | |
download | package-stash-xs-db7c38b0b0dcd88368ad5b88df89772f63292386.tar.gz package-stash-xs-db7c38b0b0dcd88368ad5b88df89772f63292386.zip |
make it explicit that anon stash support requires 5.10
Diffstat (limited to 'XS.xs')
-rw-r--r-- | XS.xs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -556,6 +556,10 @@ new(class, package) } } else if (SvROK(package) && SvTYPE(SvRV(package)) == SVt_PVHV) { +#if PERL_VERSION < 10 + croak("The XS implementation of Package::Stash does not support " + "anonymous stashes before perl 5.10"); +#else instance = newHV(); if (!hv_store(instance, "namespace", 9, SvREFCNT_inc_simple_NN(package), 0)) { @@ -563,6 +567,7 @@ new(class, package) SvREFCNT_dec(instance); croak("Couldn't initialize the 'namespace' key, hv_store failed"); } +#endif } else { croak("Package::Stash->new must be passed the name of the package to access"); |