Right now I find myself wanting get/set member functions in my PSP pages.
To accomplish this, I'm using a trick:
<%-- a bunch of HTML and PSP code --%>
<%[
__PACKAGE__->makeGetSetMethods(qw( meth1 meth2 ));
sub someOtherMethod
{
return 'foo' + 3;
}
%>
Should we add a real facility to the PSP Syntax/Compiler for this?
Maybe something like:
<%@ page memberVariables = " meth1 meth2" %>
What do you think? I don't like the __PACKAGE__ 'trick', it
doesn't feel like good programming practice. It does work, but
it feels like I'm circumventing the spirit of the PSP system.
Of course by adding all this stuff I may be putting logic in
my presentation layer that shouldn't be there...but maybe
not - PSP was designed to allow you to code in just PSP and not have
to create and register page objects...that raises another idea: being
able to declare some other PSP file as your parent, by only
referencing the file, and not the fully generated package name that
the file will translate to.
Kyle
--
------------------------------------------------------------------------------
Wisdom and Compassion are inseparable.
-- Christmas Humphreys
mo...@vo... http://www.voicenet.com/~mortis
------------------------------------------------------------------------------
|