in reply to What is the $c variable?
Hello alwynpan, and welcome to the Monastery!
I’ve never used Catalyst, but looking through the documentation I found this in Catalyst::Manual::Tutorial::02_CatalystBasics:
sub index :Path :Args(0) { my ( $self, $c ) = @_; # Hello World $c->response->body( $c->welcome_message ); }...
The "$c" here refers to the Catalyst context, which is used to access the Catalyst application. In addition to many other things, the Catalyst context provides access to "response" and "request" objects. (See Catalyst::Runtime, Catalyst::Response, and Catalyst::Request)
No doubt the other monks will be able to provide a fuller explanation. In the meantime, hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What is the $c variable?
by alwynpan (Acolyte) on Nov 01, 2016 at 04:30 UTC | |
by Laurent_R (Canon) on Nov 01, 2016 at 09:30 UTC |