From: Jerry D. Hedden Date: Wed, 23 Aug 2006 10:07:05 +0000 (-0700) Subject: Don't promulgate Perl attributes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d5adc3a12662acc8bc057d4ab07a88843ba10e31;p=p5sagit%2Fp5-mst-13.2.git Don't promulgate Perl attributes From: "Jerry D. Hedden" Message-ID: <20060823100705.fb30e530d17747c2b054d625b8945d88.87c0ee9326.wbe@email.secureserver.net> p4raw-id: //depot/perl@28753 --- diff --git a/lib/attributes.pm b/lib/attributes.pm index 714cb26..544e2f5 100644 --- a/lib/attributes.pm +++ b/lib/attributes.pm @@ -1,6 +1,6 @@ package attributes; -our $VERSION = 0.06; +our $VERSION = 0.07; @EXPORT_OK = qw(get reftype); @EXPORT = (); @@ -43,7 +43,7 @@ sub import { my @badattrs; if ($pkgmeth) { my @pkgattrs = _modify_attrs($svref, @attrs); - @badattrs = $pkgmeth->($home_stash, $svref, @attrs); + @badattrs = $pkgmeth->($home_stash, $svref, @pkgattrs); if (!@badattrs && @pkgattrs) { return unless _warn_reserved; @pkgattrs = grep { m/\A[[:lower:]]+(?:\z|\()/ } @pkgattrs; diff --git a/xsutils.c b/xsutils.c index 86fb0aa..82df4f8 100644 --- a/xsutils.c +++ b/xsutils.c @@ -85,8 +85,8 @@ modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs) #endif case 6: switch (name[3]) { - case 'l': #ifdef CVf_LVALUE + case 'l': if (memEQ(name, "lvalue", 6)) { if (negated) CvFLAGS((CV*)sv) &= ~CVf_LVALUE; @@ -95,8 +95,8 @@ modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs) continue; } break; +#endif case 'k': -#endif /* defined CVf_LVALUE */ if (memEQ(name, "locked", 6)) { if (negated) CvFLAGS((CV*)sv) &= ~CVf_LOCKED;