Hi all,
I have a question regarding controller refactoring, and whether
subclassing (or adding a Moose role) would be a good idea for a
particular application.
The application creates 6 different types of invoices, each representing
a particular type of service. Currently, I have a controller for each
that handles the various steps that must be taken to produce and
ultimately send these invoices. ALL OF THESE CONTROLLERS HAVE THE SAME
ACTIONS, and most of the same logic, which to me says I should refactor
these controllers...I just don't know how, and also whether the benefit
is worth the work. Almost certainly it would not be worth it in and of
itself, however I might want to write another application someday where
knowing this would certainly be useful :)
So IF this seems reasonable, and my controllers are 'FOOcontrol',
'BARcontrol', 'BAZcontrol', and my actions are 'initialize',
'upload_data', 'process', 'generate_invoices'...etc., what is a good way
to stay DRY? In particular I'm having a hard time wrapping my mind
around how the URI's would be handled.
Thanks,
Steve
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/