On Mon, 17 Jan 2005 23:43:45 -0800, Peter Fogg <peter.fogg@xxxxxxxxxxxxx> wrote:
> I'm new to the list so I suspect that this issue
> has been discussed before. However, I did not find
> a post that addressed this question. So here is
> my question:
Welcome to the list...
> In a sub in myapp.pm:
>
> $self->param('BG_COLOR', 'red');
> return $self->param('BG_COLOR');
>
> returns the parameter name 'BG_COLOR' not the value
> 'red'. What am I doing wrong?
That looks like it should work. Are you by chance doing this across
multiple requests? ie are you setting BG_COLOR in one request, and
then expecting it to still be there on the next request, acting lke a
session?
If so, then that will not work, as the param method only holds values
for a single request. You need to use a session module to keep your
parameters persistent. Look at CGI::Application::Plugin::Session for
an easy way of getting session support in your modules.
If that is not the problem, then you will have to provide more
information (a small code snippet that demonstrates your problem)
Cheers,
Cees
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: cgiapp-help@xxxxxxxxxxxxxxxxx
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|