in reply to How to add functions to an existing module?

Subclassing should fit the bill. Why do you want to find another solution?

Unless the superclass (Example::Model, in your example) is poorly written, you shouldn't need to have a sub new in your subclass. Example::Model::new should return a MyApp::Example::Model object when called as MyApp::Example::Model->new().

  • Comment on Re: How to add functions to an existing module?