Generate Resource classes as .pm files to enable reuse
Currently all resources are created in memory as Web::Machine subclasses. There should likely be a Schema::Loader style option to output these for future use/modification into a specific directory.
So for a DBIC Schema: MyApp/Schema/Result/Artist
There would be a corresponding MyApp//Resource/Artist MyApp//ResourceSet/Artist
These could likely also provide some override features such as url path etc.
WAPID should then load all modules in this directory and create the required Dir assuming ResourceSet to be an extension of Resource with required defaults.
This should have the added side effect of reducing start up time in WAPID, though adding a "Load on the fly" option is probably desirable.
Relates to #18.
Resource classes should:
- Extend a base class
- Allow provision for:
- path part
- Resultsource
- Writability
- Invokability
- Field mappings
- Have api invokable methods?
Sensible defaults should be provided in the base class based on existsing behaviour