[Maypole] Overriding do_edit

Nic Gibson nicg@noslogan.org
Sat, 7 Aug 2004 01:02:30 +0100


I'm having issues overriding the default behaviour of do_edit. 
Basically, I have a custom version that does a few more things and does 
some 'stuff' to make error messages more friendly. I have also split 
out the data classes to separate files because there are lot of them 
and they all have at least a little bit of custom code.  So, all my 
data classes are derived from a custom model class which defines the 
new behaviour.

I posted about this a couple of weeks back and someone was kind enough 
to suggest replace the
	
	use My::Class

statements with

	My::Class->require


in my driver module. I've tried this and it doesn't make any 
difference. Here's the first few lines of my driver (with complete 
irrelevances removed).

package PMR;

use strict;
use warnings;

BEGIN {PMR->setup('dbi:Pg:dbname=pmr', 'pmr', 'pmr', {AutoCommit => 
1});}

PMR::Freetext->require;
PMR::Person->require;

...

PMR->config->{model} = 'PMR::Model';

My custom version of do_edit is in PMR::Model. It doesn't get called. 
Can anyone see from here what stupid mistake I'm making? More code is 
available if needed.

cheers

nic