hi all...

  this brief patch allows you to override container directives using the
func parameter in a Makefile.PL, as in

my @directives = (
  { name         => '<LocationMatch',
    args_how     => 'RAW_ARGS',
    func         => 'Location',
    cmd_data     => '1',
    req_override => 'OR_ALL', },

  { name         => '<Location',
    args_how     => 'RAW_ARGS',
    cmd_data     => '0',
    req_override => 'OR_ALL', },
);

without the patch, ExtUtils changes my Apache::Foo::Location back to
Apache::Foo::LocationMatch due to the < diddling.  Seems to work as expected
with regard to end token processing - specifying a func uses my own function
while leaving it out defaults to the normal behavior.  the net result is
that using the func parameter means "I know what I'm doing - don't touch
anything" with respect to containers - for better or worse.

--Geoff

Index: ExtUtils.pm
===================================================================
RCS file: /home/cvspublic/modperl/lib/Apache/ExtUtils.pm,v
retrieving revision 1.22
diff -u -r1.22 ExtUtils.pm
--- ExtUtils.pm 2000/12/30 05:08:57     1.22
+++ ExtUtils.pm 2001/08/22 23:57:13
@@ -148,7 +148,7 @@
        }
        $name ||= $sub;
        my $realname = $name;
-       if($name =~ s/[\<\>]//g) {
+       if($name =~ s/[\<\>]//g && !$cmd->{func}) {
            if($name =~ s:^/::) {
                $name .= "_END";
            }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to