A while ago, I talked about my plans for Catalyst-Action-REST, and since then I've made some progress on refactoring to use roles instead of classes. Unfortunately, I've been stalled for the last few weeks, and I could use a nudge to get back on track.
My brain is stuck, basically, on naming issues. This feels a little silly and trivial, but it's something I've run aground on twice now, so I need to fix it somehow. The biggest problem is "serialize" -- Catalyst-Action-REST uses it both as a generic name for "things that either serialize or deserialize" and specifically for "things that serialize" (that is, "convert data to formatted text"). This means I end up wanting to use it to describe a bunch of things:
- Serialization formats, like YAML or JSON
- Common code shared by all serialization formats
- Actions implementing specific serialization formats
- The role for actions that do either serialization or deserialization
- The specific action role that does serialization
Catalyst::ActionRole::SerializeFormat
is a pretty goofy namespace.
In my previous post I threatened to split serialization out into its own distribution. I'm not sure how this would overlap with something like Data::Serializer
, which is currently used by some of C-A-REST's serialization formats. Maybe it'd be simpler to just punt to Data::Serializer
for all the serialization and deserialization, but even then I'd have to keep some class names around for backwards compatibility.
Thoughts?
(originally posted at OpenSourcery)