[Catalyst] hostname
Ash Berlin
ash_cpan at firemirror.com
Thu Jan 10 19:25:32 GMT 2008
On Jan 10, 2008, at 6:54 PM, Octavian Rasnita wrote:
> From: "Carl Johnstone" <catalyst at fadetoblack.me.uk>
>> Both the context object and the hostname should be available to
>> code within MyApp.pm, but only if the code is running during a
>> request.
>
> Ok, but how to get the hostname during a request in MyApp.pm if a $c
> variable is not available?
>
> Octavian
>
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?
-ash
More information about the Catalyst
mailing list