On 11/8/05, Kieren Diment <[EMAIL PROTECTED]> wrote:

 [using existing CDBI classes for the BeerDB worked but]

My brief experiment showed me that the untaint statements :q

don't work

if they're moved into the model classes, so for example the statement

BeerDB::Brewery->untaint_columns( printable => [qw/name notes url/]);


On 9 Nov 2005, at 15:21, Peter Speltz wrote:

This is because you "use" the classes before setup is called.   It
does not know about untaint_columns because your modules have not yet
been adopted by the base class which uses FromCGI.

You could
A) require your classes after setup like a normal app. Not sure why
docls are like that. Probably because you have to load the modules
first before they can be adopted. Therefore A probably wont work :)


A doesn't work

B) Put Class::DBI::FromCGI/AsForm statements in all your modules.
This is probably what is intended. I think the idea is that all your
modules are already built and funcioining and you just want to add
them into the Maypole app.  How about Exported actions though?  What
if you have Exported actions before setup is called ?  does it die?


This works, for FromCGI and AsForm (Just a single statement in BeerDB::DBI) , but Exported actions cause the app to fail to compile. That means that there's still something wrong with the inheritance chain...

Changing use base 'Class::DBI' to use base qw/Class::DBI Maypole::Application/ in BeerDB::DBI doesn't fix that, and I'm not sure why it should.

I'll have a play around and report back.

kd






-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to