Thanks again for the input. I'm familiar with everything you said, and I do have Damian Conways' OOP (although I haven't read it all yet).
In fact, without using Class::MethodMaker, I can write everything by hand and it works like I want it to. Here is (nearly) the same code, but without MethodMaker:
#!/usr/bin/perl use strict; use warnings; ##################################################################### ## Bug ##################################################################### package Bug; sub new { bless {}, shift } sub required { my @required = ( 'id', 'type', 'description' ); return @required; } ##################################################################### ## FixedBug ##################################################################### package FixedBug; use base ( 'Bug' ); sub new { bless {}, shift } sub required { my @required = ( 'date_fixed', 'repairer', shift->SUPER::required() ); return @required; } ##################################################################### ## Main ##################################################################### package Main; my $fixed_bug = FixedBug->new(); print join( ', ', $fixed_bug->required() ) . "\n";
See?
-Dan
In reply to Re: Re: Re: Re: Calling SUPER in MethodMaker-generated methods
by danb
in thread Calling SUPER in MethodMaker-generated methods
by danb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |