Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Howto create a Moose baseclass/superclass/contract? Moose equivalent of Module::Pluggable? Favorite way to create base/super class?
The use case is some app that does something with different backends
package iAmInYourIsa; sub dothis { croak "subclass must implement dothis" } ...
so one backend is
package iAmInYourIsa::CGI; use parent 'iAmInYourIsa'; use CGI; sub dothis { ... my $q = CGI->new ... $q->param ... }
another is iAmInYourIsa::Tk and so on and so forth?
I could cobble something using Module::Pluggable, but the verbiage is all wrong :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Howto create a Moose baseclass/superclass/contract? Moose equivalent of Module::Pluggable? Favorite way to create base/super class?
by tobyink (Canon) on Dec 26, 2012 at 14:52 UTC | |
Re: Howto create a Moose baseclass/superclass/contract? Moose equivalent of Module::Pluggable? Favorite way to create base/super class?
by karlgoethebier (Abbot) on Dec 26, 2012 at 14:52 UTC |
Back to
Seekers of Perl Wisdom