Author: gozer Date: Tue Dec 14 13:01:22 2004 New Revision: 111875 URL: http://svn.apache.org/viewcvs?view=rev&rev=111875 Log: Give an example of how to get at the contents of a custom configuration "container" directive using Apache::Directive::(as_string|as_hash)
Modified: perl/modperl/docs/trunk/src/docs/2.0/user/config/custom.pod Modified: perl/modperl/docs/trunk/src/docs/2.0/user/config/custom.pod Url: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/src/docs/2.0/user/config/custom.pod?view=diff&rev=111875&p1=perl/modperl/docs/trunk/src/docs/2.0/user/config/custom.pod&r1=111874&p2=perl/modperl/docs/trunk/src/docs/2.0/user/config/custom.pod&r2=111875 ============================================================================== --- perl/modperl/docs/trunk/src/docs/2.0/user/config/custom.pod (original) +++ perl/modperl/docs/trunk/src/docs/2.0/user/config/custom.pod Tue Dec 14 13:01:22 2004 @@ -656,7 +656,8 @@ This callback receives three arguments (similar to C<L<Apache::TAKE1|/C_Apache__TAKE1_>>), the third of which is a -string-valued scalar containing the text following the directive. +string-valued scalar containing the remaining text following the +directive line. sub MyParameter { my($self, $parms, $val) = @_; @@ -670,6 +671,17 @@ req_override => Apache::OR_ALL | Apache::OR_EXEC_ON_READ, META: complete the details, which are new to 2.0. + +To retrieve the contents of a custom "container" directive, use the +C<L<Apache::Directive>> object's methods +C<L<as_hash|Apache::Directive/C_as_hash_>> +or C<L<as_string|Apache::Directive/C_as_string_>> : + + sub MyParameter { + my($self, $parms, $val) = @_; + my $directive = $parms->directive; + my $content = $directive->as_string; + } There is one other trick to making configuration containers work. In order to be recognized as a valid directive, the I<L<name|/C_name_>> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]