You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@hyperreal.org on 1999/06/29 07:07:23 UTC

cvs commit: modperl/t/conf httpd.conf-dist

dougm       99/06/28 22:07:23

  Modified:    .        Changes
               lib/Apache Status.pm
               t/conf   httpd.conf-dist
  Log:
  added StatusLexInfo option to Apache::Status
  
  Revision  Changes    Path
  1.311     +2 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /export/home/cvs/modperl/Changes,v
  retrieving revision 1.310
  retrieving revision 1.311
  diff -u -r1.310 -r1.311
  --- Changes	1999/06/11 17:24:33	1.310
  +++ Changes	1999/06/29 05:07:21	1.311
  @@ -8,6 +8,8 @@
   
   =item 1.20_01-dev
   
  +added StatusLexInfo option to Apache::Status
  +
   =item 1.20 - June 11, 1999
   
   turn off warnings in Apache::Status::as_HTML symdump code
  
  
  
  1.17      +28 -1     modperl/lib/Apache/Status.pm
  
  Index: Status.pm
  ===================================================================
  RCS file: /export/home/cvs/modperl/lib/Apache/Status.pm,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Status.pm	1999/06/11 16:53:47	1.16
  +++ Status.pm	1999/06/29 05:07:22	1.17
  @@ -263,6 +263,7 @@
       push @retval, peek_link($r, $q, $name, $type);
       #push @retval, xref_link($r, $q, $name);
       push @retval, b_graph_link($r, $q, $name);
  +    push @retval, lexinfo_link($r, $q, $name);
       push @retval, "</pre>";
       \@retval;
   }
  @@ -270,12 +271,31 @@
   sub b_graph_link {
       my($r,$q,$name) = @_;
       return unless lc($r->dir_config("StatusGraph")) eq "on";
  -    return unless eval "require B::Graph";
  +    return unless eval { require B::Graph };
       B::Graph->UNIVERSAL::VERSION('0.03');
       my $script = $q->script_name;
       return qq(\n<a href="$script/$name?noh_b_graph">OP Tree Graph</a>\n);
   }
   
  +sub lexinfo_link {
  +    my($r, $q, $name) = @_;
  +    return unless lc($r->dir_config("StatusLexInfo")) eq "on";
  +    return unless eval { require B::LexInfo };
  +    my $script = $q->script_name;
  +    return qq(\n<a href="$script/$name?noh_lexinfo">Lexical Info</a>\n);
  +}
  +
  +sub noh_lexinfo {
  +    my $r = shift;
  +    $r->send_http_header("text/plain");
  +    no strict 'refs';
  +    my($name) = (split "/", $r->uri)[-1];
  +    $r->print("Lexical Info for $name\n\n");
  +    my $lexi = B::LexInfo->new;
  +    my $info = $lexi->cvlexinfo($name);
  +    print ${ $lexi->dumper($info) };
  +}
  +
   sub peek_link {
       my($r,$q,$name,$type) = @_;
       return unless lc($r->dir_config("StatusPeek")) eq "on";
  @@ -492,6 +512,13 @@
   functions and variables can be viewed ala B<Devel::Peek> style:
   
    PerlSetVar StatusPeek On
  +
  +=item StatusLexInfo
  +
  +With this option On and the B<B::LexInfo> module installed,
  +subroutine lexical variable information can be viewed.
  +
  + PerlSetVar StatusLexInfo On
   
   =item StatusGraph
   
  
  
  
  1.25      +9 -0      modperl/t/conf/httpd.conf-dist
  
  Index: httpd.conf-dist
  ===================================================================
  RCS file: /export/home/cvs/modperl/t/conf/httpd.conf-dist,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- httpd.conf-dist	1999/05/19 01:04:18	1.24
  +++ httpd.conf-dist	1999/06/29 05:07:23	1.25
  @@ -71,6 +71,7 @@
   </Files>
   
   Alias /perl/ ./t/net/perl/
  +Alias /lexinfo/ ./t/net/perl/
   Alias /perl_xs/ ./t/net/perl/
   Alias /dirty-perl/ ./t/net/perl/
   
  @@ -88,6 +89,13 @@
   PerlSendHeader       Off
   </Location>
   
  +<Location /lexinfo>
  +SetHandler perl-script
  +PerlHandler Apache::RegistryLexInfo->handler
  +Options +ExecCGI
  +PerlSendHeader       Off
  +</Location>
  +
   <Location /perl_xs>
   ErrorDocument 500 /perl_xs/server_error.pl
   SetHandler perl-script
  @@ -144,6 +152,7 @@
   PerlSetVar StatusPeek On
   PerlSetVar StatusGraph On
   PerlSetVar StatusDumper On
  +PerlSetVar StatusLexInfo On
   SetHandler perl-script
   PerlHandler +Apache::Status
   </Location>