[Catalyst] WritingPlugins doc is wrong?

Ktat ktat at kawachi.zaq.ne.jp
Sat Jun 10 19:18:09 CEST 2006


I read Catalyst::Manual::WritngPlugins and found following.

http://search.cpan.org/~agrundma/Catalyst-5.6902/lib/Catalyst/Manual/WritingPlugins.pod
The code in EXAMPLE is following.
=====================================================================
  sub prepare {
      my $class = shift;

      # Turns the engine-specific request into a Catalyst context .
      my $c = $class->NEXT::prepare( @_ );
=====================================================================

explanation after the code is following
=====================================================================
    sub prepare {

These methods are called without attributes (Private, Local, etc.).

    my $c = shift;

We get the context object for this request as the first argument.
Hint!:Be sure you shift the context object out of @_ in this. If you just do a
=====================================================================

In the code, argument passed to prepare is Class name.
In the explanation, argument passed to prepare is context object.

I thnk example is right, arguments of prepare is Class name.

Thanks.

-- 
Kato Atsushi (Ktat)
 mailto:atusi at pure.ne.jp
 mailto:ktat at kawachi.zaq.ne.jp



More information about the Catalyst mailing list