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...@apache.org on 2002/05/23 18:00:59 UTC

cvs commit: modperl/lib/Apache Status.pm

dougm       02/05/23 09:00:59

  Modified:    lib/Apache Status.pm
  Log:
  make it possible to configure the registry cache via
  Apache::Status->registry_cache(\%cache);
  
  Revision  Changes    Path
  1.25      +15 -2     modperl/lib/Apache/Status.pm
  
  Index: Status.pm
  ===================================================================
  RCS file: /home/cvs/modperl/lib/Apache/Status.pm,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Status.pm	31 Mar 2000 18:19:48 -0000	1.24
  +++ Status.pm	23 May 2002 16:00:59 -0000	1.25
  @@ -1,7 +1,7 @@
   package Apache::Status;
   use strict;
   
  -$Apache::Status::VERSION = '2.02';
  +$Apache::Status::VERSION = '2.03';
   
   my %is_installed = ();
   my $Is_Win32 = ($^O eq "MSWin32");
  @@ -180,13 +180,26 @@
       \@retval;
   }
   
  +my $RegistryCache;
  +
  +sub registry_cache {
  +    my($self, $cache) = @_;
  +
  +    if ($cache) {
  +        $RegistryCache = $cache;
  +    }
  +
  +    $RegistryCache || $Apache::Registry;
  +}
  +
   sub status_rgysubs {
       my($r,$q) = @_;
       my(@retval);
       local $_;
       my $uri = $r->uri;
  +    my $cache = __PACKAGE__->registry_cache;
       push @retval, "<b>Click on package name to see its symbol table</b><p>\n";
  -    foreach (sort keys %{$Apache::Registry}) {
  +    foreach (sort keys %$cache) {
   	push @retval, 
   	qq(<a href="$uri?$_">$_</a>\n),
   	"<br>";