Hi, I'm struggling with MooseX::NonMoose.
I have a class which inherits from a nonmoose class and all works fine. For
this I have used FOREIGNBUILDARGS as follows.
package A;
...
sub FOREIGNBUILDARGS {
my $class = shift;
my %args = @_;
my $title = exists $args{title} ? $args{title} : "defaultTitle";
return ( $title );
}
But now I want another class B to extend class A but having another default
title. I figured I can do this by:
- overriding FOREIGNBUILDARGS but hence I don't want this because class B
should not need any specific nonMoose code in it.
- defining the defaultTitle in a class sub and calling this sub in
FOREIGNBUILDARGS for class A. Then override that sub in class B. This seems
cleaner but does create some (little) overhead.
Is there any other way to achieve this behavior ?
thx
--
erik
signature.asc
Description: Message signed with OpenPGP using GPGMail
