[Catalyst] redirect and formfu controller

Kalman Kiss ssikiss at zalaszam.hu
Tue Dec 4 14:21:39 GMT 2007


Carl Franks wrote:
> Your debug statements are showing the output (addresses) of
> controller->path_prefix() - but you're comparing only controller().
>   

No, they show the address of the login controller, prefix is only there 
because I was mistrustful and curious :) :
...
        $c->log->debug('*** Controller: '.$c->controller.', 
path_prefix='.$c->controller->path_prefix($c).' ***');
        $c->log->debug('*** Login Controller: 
'.$c->controller('Login').', 
path_prefix='.$c->controller('Login')->path_prefix($c).' ***');

        if (
            $c->controller eq $c->controller('Login')
#           $c->controller->path_prefix($c) eq 
$c->controller('Login')->path_prefix($c)
            || ($c->controller eq $c->controller('Register'))
            || ($c->controller eq $c->controller('Passremainder'))
        ) {
                $c->log->debug('*** Root: login, reg or passremainder. 
***');
                return 1;
        }
...

> - although I didn't realise controller() within Login.pm returned the
> exact same object as controller('Login') did.
> I've not really used controller() very much, so can't really advise.
>
> Were you still only comparing ($c->controller eq
> $c->controller('Login'))  and not path_prefix() when you switched back
> to Catalyst::Controller, and it worked?
>   

Im comparing the controllers and it works when C::C the base is.

Thanx for your efforts so far. :)
Greetings,
Kami




More information about the Catalyst mailing list