[Catalyst-dev] The lib of "my ($self, $c) = @_;"
Peter Edwards
peter at dragonstaff.co.uk
Tue Nov 23 12:32:34 GMT 2010
On 23 November 2010 03:45, NGUYENHONGTHAI <nguyenhongthaiptit at gmail.com>wro=
te:
> In a subroutine of a controller, we always use this command: my ($self, $=
c)
> =3D @_;
> And then use some method of $self, $c, example: $c -> stash, $c -> forwar=
d.
> How do I get all method of $c and $self (such as automatic complete of so=
me
> editor of another languages)
>
> Pls give a link or document to understand them.
>
>
You can do it with the debugger:
http://search.cpan.org/~zarquon/Catalyst-Manual-5.8005/lib/Catalyst/Manual/=
Tutorial/07_Debugging.pod
<http://search.cpan.org/~zarquon/Catalyst-Manual-5.8005/lib/Catalyst/Manual=
/Tutorial/07_Debugging.pod>section
"Next, list the methods available on our Book model:"
use the debugger 'm' command on $c, model objects etc. to see what methods
and inheritance tree are in use
Alternatively, read the docs
http://search.cpan.org/perldoc?Catalyst
and manual
http://search.cpan.org/~zarquon/Catalyst-Manual-5.8005/lib/Catalyst/Manual.=
pm
or read through the source code to figure out the class hierarchy
http://cpansearch.perl.org/src/BOBTFISH/Catalyst-Runtime-5.80029/lib/
Cheers, Peter
http://perl.dragonstaff.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst-dev/attachments/20101123/f=
81dc27a/attachment.htm
More information about the Catalyst-dev
mailing list