Skip Menu |

This queue is for tickets about the namespace-sweep CPAN distribution.

Report information
The Basics
Id: 71745
Status: open
Priority: 0/
Queue: namespace-sweep

People
Owner: FRIEDO [...] cpan.org
Requestors: len.budney [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.002
Fixed in: (no value)



Subject: Doesn't work with Class::Std
If I use namespace::sweep in a package based on Class::Std, the :ATTR() trait breaks. I tested this by using namespace::sweep in CLI::Startup and then doing a "make test." The problem manifests itself immediately.
From: chip [...] pobox.com
On Mon Oct 17 13:27:42 2011, BUDNEY wrote: Show quoted text
> If I use namespace::sweep in a package based on Class::Std, the :ATTR() > trait breaks. > > I tested this by using namespace::sweep in CLI::Startup and then doing a > "make test." The problem manifests itself immediately.
What's the right thing to do in that case? Leave &ATTR alone?
On Wed Aug 29 07:01:29 2012, CHIPS wrote: Show quoted text
> > What's the right thing to do in that case? Leave &ATTR alone?
I'm not sure what's going wrong. The error message is, Error: Invalid HASH attribute: ATTR() at ./CLI-Startup/blib/lib/CLI/Startup.pm line 238 I'm thinking that namespace::sweep is sweeping the sub MODIFY_HASH_ATTRIBUTES(), which is causing attributes not to be processed correctly. It gets shoved into my class's namespace by Class::Std::import() as a monkey patch. When I add MODIFY_HASH_ATTRIBUTES and MODIFY_CODE_ATTRIBUTES to %keep in a local copy of sweep.pm, my tests all pass. That's obviously not the right fix, but it suggests what the problem is.