stas 2004/01/12 00:42:52 Modified: src/docs/2.0/user/coding coding.pod Log: start a new section: Method Handlers Revision Changes Path 1.29 +26 -0 modperl-docs/src/docs/2.0/user/coding/coding.pod Index: coding.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/coding/coding.pod,v retrieving revision 1.28 retrieving revision 1.29 diff -u -u -r1.28 -r1.29 --- coding.pod 4 Dec 2003 04:50:23 -0000 1.28 +++ coding.pod 12 Jan 2004 08:42:52 -0000 1.29 @@ -19,6 +19,32 @@ C<L<ModPerl::MethodLookup|docs::2.0::api::ModPerl::MethodLookup>> can be used to find out which modules need to be used. + +=head1 Method Handlers + +In mod_perl 2.0 method handlers are declared using the C<method> +attribute: + + package Bird; + @ISA = qw(Eagle); + + sub handler : method { + my($class, $r) = @_; + ...; + } + +See the I<attributes> manpage. + +If C<Class-E<gt>method> syntax is used for a C<Perl*Handler>, the +C<:method> attribute is not required. + +META: need to port the method handlers document from mp1 guide, may be +keep it as a separate document. Meanwhile refer to L<that +document|docs::1.0::guide::method_handlers>, though L<replace the C<$$> +prototype with the C<:method> attribute +|docs::2.0::user::porting::compat/Method_Handlers>. + + =head1 Goodies Toolkit =head2 Environment Variables
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]