On Jan 10, 2008, at 6:54 PM, Octavian Rasnita wrote:

From: "Carl Johnstone" <[EMAIL PROTECTED]>
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

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

Reply via email to