You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by be...@apache.org on 2002/05/06 14:04:56 UTC

cvs commit: httpd-2.0/support list_hooks.pl

ben         02/05/06 05:04:56

  Modified:    support  list_hooks.pl
  Log:
  Be more tolerant.
  
  Revision  Changes    Path
  1.2       +15 -6     httpd-2.0/support/list_hooks.pl
  
  Index: list_hooks.pl
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/list_hooks.pl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- list_hooks.pl	27 May 2001 15:31:08 -0000	1.1
  +++ list_hooks.pl	6 May 2002 12:04:56 -0000	1.2
  @@ -4,20 +4,20 @@
   
   use Carp;
   
  -my $path=shift;
  +my $path=shift || '.';
   
   findInDir($path);
   
   foreach my $hook (sort keys %::Hooks) {
       my $h=$::Hooks{$hook};
       for my $x (qw(declared implemented type args)) {
  -	croak "$hook datum '$x' missing" if !exists $h->{$x};
  +	print "$hook datum '$x' missing\n" if !exists $h->{$x};
       }
       print "$hook\n";
  -    print "  declared in $h->{declared}\n";
  -    print "  implemented in $h->{implemented}\n";
  -    print "  type is $h->{type}\n";
  -    print "  $h->{ret} $hook($h->{args})\n";
  +    print "  declared in $h->{declared}\n" if defined $h->{declared};
  +    print "  implemented in $h->{implemented}\n" if defined $h->{implemented};
  +    print "  type is $h->{type}\n" if defined $h->{type};
  +    print "  $h->{ret} $hook($h->{args})\n" if defined $h->{args};
       print "\n";
   }
   
  @@ -61,6 +61,15 @@
   	    $::Hooks{$name}->{declared}=$file;
   	    $::Hooks{$name}->{ret}=$ret;
   	    $::Hooks{$name}->{args}=$args;
  +	} elsif(/AP_DECLARE_HOOK\(([^,]+),([^,]+)/) {
  +# really we should swallow subsequent lines to get the arguments...
  +	    my $name=$2;
  +	    my $ret=$1;
  +	    croak "$name declared twice! ($_)"
  +		if exists $::Hooks{$name}->{declared};
  +	    $::Hooks{$name}->{declared}=$file;
  +	    $::Hooks{$name}->{ret}=$ret;
  +	    $::Hooks{$name}->{args}='???';
   	}
   	if(/AP_IMPLEMENT_HOOK_()(VOID)\(([^,\s]+)/
   	   || /AP_IMPLEMENT(_OPTIONAL|)_HOOK_(.*?)\([^,]+?\s*,\s*([^,\s]+)/) {