water has asked for the wisdom of the Perl Monks concerning the following question:
I want to subclass Class::MakeMethods (to, say, MyMakeMethods) such that optional and required fields can be specified.
My goal: to have a MyMakeMethods such that I can then create a new class Foo (subclassing MyMakeMethods) with (say) scalar parameters x,y,z, where x and y must be defined on creation (and, say, z is optional). If x and y not defined, then the call to new dies.
I am having a hard time seeing how to wrap C:MakeMethods this way and would welcome suggestions.
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: subclassing MakeMethods
by simonm (Vicar) on Dec 07, 2004 at 18:19 UTC | |
by water (Deacon) on Dec 10, 2004 at 09:26 UTC |