From: "Ash Berlin" <[EMAIL PROTECTED]>
How did you get to a function in MyApp.pm during a request....

# in MyApp.pm

sub foobarbaz {
   my ($c) = @_;
}

# In controller code.
$c->foobarbaz();

Make sense?

Not really.

I've tried (in MyApp.pm):

sub the_host {
my ($c) = @_;
return $c->req->hostname;
}

and then I've tried to use

cookie_domain => the_host()
in the MyApp config, but when I try to start the server it gives an error telling that I can't use the method "req" because $c is undefined.

But anyway, what I need is working because I can avoid setting a domain name for the cookie.

Octavian


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to