On Mon, Aug 01, 2011 at 10:59:35AM -0700, Brandon Fosdick wrote:

> My day job has me manually creating descriptors for USB devices more often 
> than I care to, so I've created a module for auto-generating said 
> descriptors. The resulting object tree can then be output as a structure 
> suitable for compiling, or assembling, into a device's firmware. Where in the 
> namespace hierarchy should I put these objects?
> 
> For the moment I'm using USB::Descriptor::Device, USB::Descriptor::Interface 
> and so on. Eventually I'll also have USB::HID::Descriptor::Device, etc. But, 
> it seems there is no USB namespace in CPAN. I see that packages that 
> represent, or interface with, specific devices live under Device::, and 
> Device::USB in particular. However, that doesn't seem like a proper home for 
> a module that deals with concepts at the specification level, as opposed to 
> interacting with a particular connected device. That, and 
> Device::USB::Descriptor::Device seems a little silly.
> 
> Suggestions? Thoughts? Any problems with me creating a top level USB 
> namespace?

I'd have thought that Device::USB::Descriptor would be a good place,
with no need for a further ::Device.  Underneath that you could have
things like D::U::Descriptor::HID, D::U::Descriptor::Storage or
whatever.

-- 
David Cantrell | Nth greatest programmer in the world

The children now love luxury; they have bad manners, contempt for
authority; they show disrespect for elders and love chatter in place
of exercise. Children are now tyrants, not the servants of their
households. They no longer rise when elders enter the room. They
contradict their parents, chatter before company, gobble up dainties
at the table, cross their legs, and tyrannize their teachers.
    -- attributed by Plato to Socrates

Reply via email to