[cgiapp] Application params problem

Cees Hek ceeshek at gmail.com
Thu Jul 10 20:33:42 EDT 2008


Hi Amelia,

Whenever someone has problems using a simple method like $self->param,
I immediately think of namespace collision.  My guess is that you have
something like this in your CGI::Application module:

use CGI qw(:standard);

What that does is import a bunch of subroutines into your application,
and one of them is called 'param'.  So when you call $self->param you
are not calling the param in CGI::Application, but the one in CGI.pm.
Hence --  All hell breaks loose.

It may not be CGI.pm causing the issue, as 'param' is a pretty common
subroutine name.  But my guess is some module is polluting your
namespace.

Cheers,

Cees

On Fri, Jul 11, 2008 at 9:56 AM, Amelia Ireland
<amelia.ireland at gmail.com> wrote:
>
> On 10 Jul 2008, at 15:50, David Baxter wrote:
>
>> Hi Amelia,
>>
>> It looks like you are trying to set the CA params like query params and I
>> don't think that works. Try a different syntax :
>> $self->param('validated_query' => $valid_h);
>
> I tried both $self->param('validated_query', $valid_h) and
> $self->param('validated_query' => $valid_h), but neither works, although
> according to the docs, both are valid methods of setting params [ see
> http://search.cpan.org/~markstos/CGI-Application/lib/CGI/Application.pm#param() ].
> In both cases, when I try to get the param value using
> $self->param('validated_query'), it has been set to 'validated_query',
> rather than $valid_h.
>
> Hmmm...
>
> --
> Amelia Ireland
> GO Editorial Office
> http://www.ebi.ac.uk || http://www.berkeleybop.org
> BBOP Plant Project: http://bbopgarden.blogspot.com


More information about the cgiapp mailing list