[cgiapp] Losing params - wtf is wrong??

Mark Jaffe jaffe.mark at gmail.com
Sat Aug 16 17:14:56 EDT 2008


Ron,

I've updated the snippet page at 
http://71.202.190.49/~mjaffe/CGI-app.log; it now shows how the data is 
set in the "profile". The single-arg method is used because the 
"profile" has no associated class. I added the "bless" when I got an 
error "Can't call method "param" on unblessed reference at LDAP/Login.pm 
line 122," when the code looked like this:

    if ( $self->param('profile') ) {
       if ( $self->param("profile")->param('ticket') ) {
            $template->param(USER => 
$self->param("profile")->param('nick'));
            $template->param(GROUP 
=>$self->param("profile")->param('group'));
        }
    }   

This code is somewhat based on an example found here: 
http://cgi-app.org/index.cgi?LoginLogoutExampleApp

Mark

Ron Savage wrote:
> Hi Mark
>
>   
>> details here <>, I'd 
>>     
>
> Why use the one-argument version of bless?
>
> And, after that, I would not expect data associated with
> $self -> param('profile') to be available as
> $profile -> param('xxx'), but it's hard to be sure without knowing the
> class struture of $profile.
>   


More information about the cgiapp mailing list