[Maypole] Overriding do_edit

Simon Flack simon.flack@bbc.co.uk
Mon, 9 Aug 2004 11:24:34 +0100


maypole-admin@lists.netthink.co.uk
<mailto:maypole-admin@lists.netthink.co.uk> wrote on 07 August 2004
01:03:

> I'm having issues overriding the default behaviour of do_edit.

[snip]

> package PMR;
>=20
> use strict;
> use warnings;
>=20
> BEGIN {PMR->setup('dbi:Pg:dbname=3Dpmr', 'pmr', 'pmr', {AutoCommit =3D>=

> 1});}
>=20
> PMR::Freetext->require;
> PMR::Person->require;
>=20
> ...
>=20
> PMR->config->{model} =3D 'PMR::Model';
>=20
> 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.

You need to set your model class before calling setup() on your driver.

HTH
--simonflk=20


http://www.bbc.co.uk/ - World Wide Wonderland

This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system.=20
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received.=20
Further communication will signify your consent to this.