Skip to content

Instantly share code, notes, and snippets.

@moltar
Created January 28, 2013 23:18
Show Gist options
  • Save moltar/4660202 to your computer and use it in GitHub Desktop.
Save moltar/4660202 to your computer and use it in GitHub Desktop.
help with class organization
App::ControllerBase::REST
App::ControllerBase::REST::API
App::ControllerBase::REST::GUI
App::Controller::API::V1::Manufacturer (currently inherits from App::ControllerBase::REST::API)
App::Controller::GUI::Manufacturer (currently inherits from App::ControllerBase::REST::GUI)
But also needs to inherit from a common ::Manufacturer class that actually implements most of the
shared functionality for fetching records from store. Currently done via Traits, but this is undesirable
due to __PACKGE__->config needing to be shared as well, which cannot be added via Traits.
And API/GUI base classes cannot be converted to traits, because when the traits/roles are merged they
overload all of the custom methods with methods defined in the role.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment