Hi, generally if you have some classes that have a common number of attributes and/or methods you'd move those in a base class or in more recent time construct it out of roles which are like lego blocks.
For your specific case https://metacpan.org/module/CatalystX::Resource looks to be the solution you are looking for. BR Alex On 2013-07-17 04:05, cc loo wrote: Hi all, i'm a network engineer by trade and is picking up perl/catalyst to upgrade my skills :) I have a couple of controllers each having same methods, chaining off their respective 'base' methods. I build my controllers off this guide here: http://search.cpan.org/~ether/Catalyst-Manual-5.9007/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod#Refactor_to_Use_a_'base'_Method_to_Start_the_Chains<http://search.cpan.org/%7Eether/Catalyst-Manual-5.9007/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod#Refactor_to_Use_a_%27base%27_Method_to_Start_the_Chains> So, i have controller_a with a method 'list' , chaining off 'base' controller_b with a method 'list', chaining off' 'base' Is there a more graceful manner of inheriting this method instead of copy/paste on every controller i have ? _______________________________________________ List: [email protected]<mailto:[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/ *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"* T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien Handelsgericht Wien, FN 79340b *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"* Notice: This e-mail contains information that is confidential and may be privileged. If you are not the intended recipient, please notify the sender and then delete this e-mail immediately. *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
_______________________________________________ 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/
