cvsuser     02/02/18 11:01:22

  Modified:    P5EEx/Blue MANIFEST Makefile.PL
               P5EEx/Blue/P5EEx/Blue Context.pm P5EE.pm exceptions.pod
               P5EEx/Blue/sbin perldocs.PL
  Added:       P5EEx/Blue .cvsignore MANIFEST.SKIP
               P5EEx/Blue/htdocs .cvsignore
  Log:
  minor file maintenance
  
  Revision  Changes    Path
  1.10      +1 -1      p5ee/P5EEx/Blue/MANIFEST
  
  Index: MANIFEST
  ===================================================================
  RCS file: /cvs/public/p5ee/P5EEx/Blue/MANIFEST,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -w -r1.9 -r1.10
  --- MANIFEST  15 Feb 2002 18:41:01 -0000      1.9
  +++ MANIFEST  18 Feb 2002 19:01:21 -0000      1.10
  @@ -101,4 +101,4 @@
   cgi-bin/button
   cgi-bin/p5ee
   cgi-bin/p5ee.conf.sample
  -cgi-bin/p5ee.pl.sample
  +cgi-bin/config.pl.sample
  
  
  
  1.11      +4 -2      p5ee/P5EEx/Blue/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /cvs/public/p5ee/P5EEx/Blue/Makefile.PL,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -w -r1.10 -r1.11
  --- Makefile.PL       8 Feb 2002 20:52:15 -0000       1.10
  +++ Makefile.PL       18 Feb 2002 19:01:21 -0000      1.11
  @@ -1,6 +1,6 @@
   
   ######################################################################
  -## File: $Id: Makefile.PL,v 1.10 2002/02/08 20:52:15 spadkins Exp $
  +## File: $Id: Makefile.PL,v 1.11 2002/02/18 19:01:21 spadkins Exp $
   ######################################################################
   
   use ExtUtils::MakeMaker;
  @@ -26,7 +26,7 @@
       'PL_FILES'    => { (map {("sbin/$_.PL" => "sbin/$_")} @sbin_programs),
                          (map {("cgi-bin/$_.PL" => "cgi-bin/$_")} @cgibin_programs),
                          (map {("bin/$_.PL" => "bin/$_")} @bin_programs )},
  -    'EXE_FILES'   => [ map {"bin/$_"} @bin_programs ],
  +    'EXE_FILES'   => [ (map {"bin/$_"} @bin_programs) ],
       'PREREQ_PM'   => { # I haven't yet determined what the minimum versions should 
be
                          'Fatal'            => 0,
                          'Error'            => 0,
  @@ -97,6 +97,8 @@
   else {
       $TEMPLATEDIR = "$PREFIX/templates";
   }
  +# oops. INSTALLSCRIPT is where programs should go, i.e. $PREFIX/bin
  +# I had better find another way to install templates in the right place
   $opts{'INST_SCRIPT'} = 'templates';        # local build area
   $opts{'INSTALLSCRIPT'} = "$TEMPLATEDIR/$opts{NAME}";  # install area
   
  
  
  
  1.1                  p5ee/P5EEx/Blue/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  blib
  Makefile
  pm_to_blib
  *.tar.gz
  *.bak
  pod2htm*
  htdocs/api/*.html
  
  
  
  1.1                  p5ee/P5EEx/Blue/MANIFEST.SKIP
  
  Index: MANIFEST.SKIP
  ===================================================================
  ~$
  ^MANIFEST\.
  ^Makefile$
  ^blib/
  ^pm_to_blib$
  \.old$
  \.bak$
  \.cvsignore$
  \.tar\.gz$
  htdocs/.exists
  CVS/
  
  
  
  1.15      +15 -10    p5ee/P5EEx/Blue/P5EEx/Blue/Context.pm
  
  Index: Context.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/P5EEx/Blue/P5EEx/Blue/Context.pm,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -w -r1.14 -r1.15
  --- Context.pm        15 Feb 2002 18:38:37 -0000      1.14
  +++ Context.pm        18 Feb 2002 19:01:21 -0000      1.15
  @@ -1,6 +1,6 @@
   
   #############################################################################
  -## $Id: Context.pm,v 1.14 2002/02/15 18:38:37 spadkins Exp $
  +## $Id: Context.pm,v 1.15 2002/02/18 19:01:21 spadkins Exp $
   #############################################################################
   
   package P5EEx::Blue::Context;
  @@ -484,10 +484,15 @@
           $class = $service->{"${lcf_type}Class"};      # find class of service
   
           if (!defined $class || $class eq "") {      # error if no class given
  +            if ($name eq "global") {
  +                $class = "P5EEx::Blue::$type";      # assume the "generic" class
  +            }
  +            else {
               P5EEx::Blue::Exception->throw(
                   error => "service(): no class specified\n",
               );
           }
  +        }
   
           if (! $self->{used}{$class}) {      # load the code
               eval "use $class;";
  @@ -637,7 +642,7 @@
                   $self->{session}{cache}{Widget}{$name}{$var} = $value;
               }
           }
  -        $self->dbgprint("Session->wget($name,$var) (value) = [$value]")
  +        $self->dbgprint("Context->wget($name,$var) (value) = [$value]")
               if ($P5EEx::Blue::Context::DEBUG && $self->dbg(ref($self),"wget",3));
           return $value;
       } # match {
  @@ -652,7 +657,7 @@
                   $self->{session}{cache}{Widget}{$name}{$var} = $value;
               }
           }
  -        $self->dbgprint("Session->wget($name,$var) (attrib) = [$value]")
  +        $self->dbgprint("Context->wget($name,$var) (attrib) = [$value]")
               if ($P5EEx::Blue::Context::DEBUG && $self->dbg(ref($self),"wget",3));
           return $value;
       } # match {
  @@ -661,9 +666,9 @@
       $var =~ s/\{([^\}]+)\}/\{"$1"\}/g;
       $perl = "\$value = \$self->{session}{cache}{Widget}{\$name}$var;";
       eval $perl;
  -    print STDERR "ERROR: Session->get($var): eval ($perl): $@\n" if ($@);
  +    print STDERR "ERROR: Context->get($var): eval ($perl): $@\n" if ($@);
   
  -    $self->dbgprint("Session->wget($name,$var) (indexed) = [$value]")
  +    $self->dbgprint("Context->wget($name,$var) (indexed) = [$value]")
           if ($P5EEx::Blue::Context::DEBUG && $self->dbg(ref($self),"wget",3));
       return $value;
   }
  @@ -697,7 +702,7 @@
       my ($self, $name, $var, $value) = @_;
       my ($perl);
   
  -    $self->dbgprint("Session->wset($name,$var,$value)")
  +    $self->dbgprint("Context->wset($name,$var,$value)")
           if ($P5EEx::Blue::Context::DEBUG && $self->dbg(ref($self),"wset",3));
   
       if ($var !~ /[\[\]\{\}]/) {         # no special chars, "foo.bar"
  
  
  
  1.8       +2 -2      p5ee/P5EEx/Blue/P5EEx/Blue/P5EE.pm
  
  Index: P5EE.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/P5EEx/Blue/P5EEx/Blue/P5EE.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -w -r1.7 -r1.8
  --- P5EE.pm   5 Feb 2002 22:23:29 -0000       1.7
  +++ P5EE.pm   18 Feb 2002 19:01:21 -0000      1.8
  @@ -1,6 +1,6 @@
   
   #############################################################################
  -## $Id: P5EE.pm,v 1.7 2002/02/05 22:23:29 spadkins Exp $
  +## $Id: P5EE.pm,v 1.8 2002/02/18 19:01:21 spadkins Exp $
   #############################################################################
   
   package P5EEx::Blue::P5EE;
  @@ -68,7 +68,7 @@
       o an Enterprise Software Architecture, supporting all the Attributes
           http://www.officevision.com/pub/p5ee/definitions.html
       o a Software Architecture supporting many Platforms
  -        http://www.officevision.com/pub/p5ee/platforms.html
  +        http://www.officevision.com/pub/p5ee/platform.html
       o a pluggable interface/implementation service architecture
       o support developers who wish to use portions of the P5EE
           without giving up their other styles of programming
  
  
  
  1.3       +1 -1      p5ee/P5EEx/Blue/P5EEx/Blue/exceptions.pod
  
  Index: exceptions.pod
  ===================================================================
  RCS file: /cvs/public/p5ee/P5EEx/Blue/P5EEx/Blue/exceptions.pod,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- exceptions.pod    5 Feb 2002 22:20:13 -0000       1.2
  +++ exceptions.pod    18 Feb 2002 19:01:21 -0000      1.3
  @@ -290,7 +290,7 @@
     Online Doc: man perlvar (or "perldoc perlvar")
   
   This handler is not necessary to know about to do exception 
  -programming in Perl.  However, it may be used modules which assist
  +programming in Perl.  However, it may be used by modules that assist
   in exception handling tasks.
   
   The %SIG hash contains references to subroutines which are called
  
  
  
  1.1                  p5ee/P5EEx/Blue/htdocs/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  .exists
  
  
  
  1.3       +137 -3    p5ee/P5EEx/Blue/sbin/perldocs.PL
  
  Index: perldocs.PL
  ===================================================================
  RCS file: /cvs/public/p5ee/P5EEx/Blue/sbin/perldocs.PL,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- perldocs.PL       16 Feb 2002 18:05:32 -0000      1.2
  +++ perldocs.PL       18 Feb 2002 19:01:22 -0000      1.3
  @@ -12,11 +12,14 @@
   print OUT <<"!SUBSTITUTIONS!OK!";
   $Config{'startperl'} -w
   
  +my \$archname = "$Config{'archname'}";
  +my \$perlversion = "$Config{'version'}";
  +
   !SUBSTITUTIONS!OK!
   
   print OUT <<'!NO!SUBSTITUTIONS!';
   #############################################################################
  -## $Id: perldocs.PL,v 1.2 2002/02/16 18:05:32 spadkins Exp $
  +## $Id: perldocs.PL,v 1.3 2002/02/18 19:01:22 spadkins Exp $
   #############################################################################
   ## (c) 2002 Stephen Adkins <[EMAIL PROTECTED]>
   ## This is free software, available under the same terms as Perl itself.
  @@ -134,6 +137,46 @@
     ${class_group}-frame.html # list of classes and docs [classGroupFrame]
     ${class_group}-tree.html  # inheritance tree         [classFrame]
   
  +=head2 Heading Menus
  +
  +At the top of each page which is meant to view in the classFrame, there is
  +a heading menu with the following.
  +
  +   Overview   Class-Group   Class   Use   Tree
  +
  +It will be changed to the following.
  +
  +   Installation   Distribution   Class-Group   Class  :  Doc   Use   Tree
  +   Installation   Distribution   File-Group    File   :  Doc   Use
  +
  +This represents a 2-dimensional grid of possible documents, so two of the elements
  +will always be highlighted.  The rest will all be available links.
  +
  +                  Use   Tree   Doc
  +   Installation    X      X     X
  +   Distribution    X      X     X
  +   Class-Group     X      X     X
  +   Class           X      X    POD
  +
  +The meanings of the 12 types of documents are as follows.
  +
  +   Installation (a given set of directories in @INC)
  +                  Use   - global distribution-dependency tree of all distributions
  +                  Tree  - global inheritance tree for all classes in all 
distributions
  +                  Doc   - summary doc for the installation
  +   Distribution (a distribution (Pkg-0.20.tar.gz) as installed from CPAN)
  +                  Use   - distribution-dependency tree of this distribution
  +                  Tree  - inheritance tree including ancestors/descendents of 
classes in distribution
  +                  Doc   - summary doc for the distribution
  +   Class-Group (a group of classes within a distribution)
  +                  Use   - class-dependency tree of all classes in class group
  +                  Tree  - inheritance tree including ancestors/descendents of 
classes in class group
  +                  Doc   - summary doc for the class group
  +   Class (a single class or file of documentation)
  +                  Use   - class-dependency tree of this class
  +                  Tree  - inheritance tree including ancestors/descendents of this 
class
  +                  Doc   - POD doc for the class
  +
   =cut
   
   use strict;
  @@ -146,6 +189,7 @@
   my $pmlibdirs = "lib";
   my $distname  = "";
   my $version   = "";
  +my $installed = 0;
   my $verbose   = 0;
   
   my (%data, %source_file, $datetime);
  @@ -156,13 +200,14 @@
   );
   
   {
  -    my ($success, $option);
  +    my ($success, $option, $incdir);
       my %opt_descriptions = (
           'dir'       => "Directory to correct outputted HTML POD documentation",
           'docroot'   => "Base of URL tree (corresponding to 'dir' in the directory 
tree)",
           'distname'  => "Distribution name",
           'version'   => "Distribution version",
           'pmlibdirs' => "Directories to scan for .pod and .pm source files",
  +        'installed' => "Scan all directories in \@INC to document the current 
installation",
       );
   
       $success = GetOptions (
  @@ -172,6 +217,7 @@
          "distname=s"  => \$distname,
          "version=s"   => \$version,
          "verbose"     => \$verbose,
  +       "installed"   => \$installed,
       );
   
       if (!$success) {
  @@ -187,6 +233,70 @@
       mkdir("$dir/api", 0777) if ($dir);
   
       #############################################################################
  +    # Scan current installation
  +    #############################################################################
  +
  +    if ($installed) {
  +        foreach $incdir (@INC) {
  +            next if (! -d $incdir);
  +            # replace this with the Perl version of "find" someday
  +            my (@podfiles, $podfile, $module, %file_seen);
  +            open (FIND, "find $incdir -name '*.pod' -print |") || die "Unable to 
get file list: $!\n";
  +            @podfiles = <FIND>;
  +            close(FIND);
  +            chomp(@podfiles);
  +    
  +            # Search through each POD file
  +            foreach $podfile (@podfiles) {
  +    
  +                next if ($file_seen{$podfile});
  +
  +                $module = $podfile;
  +                $module =~ s!^$incdir/!!;
  +                $module =~ s!\.pod$!!;
  +
  +                next if ($module =~ m!^site_perl/! || $module =~ m!^$archname/! ||
  +                         $module =~ m!^$perlversion/! || $module =~ m!^[0-9.]+/! || 
$module =~ m!^blib/!);
  +                $file_seen{$podfile} = 1;
  +
  +                $module =~ s!/!::!g;
  +                #print "POD file: $podfile => $module\n";
  +                #&write_pod2html($podfile, $dir, $module, $docroot);
  +    
  +                #&scan_source($podfile, $module);
  +            }
  +    
  +            # replace this with the Perl version of "find" someday
  +            my (@pmfiles, $pmfile);
  +            open (FIND, "find $incdir -name '*.pm' -print |") || die "Unable to get 
file list: $!\n";
  +            @pmfiles = <FIND>;
  +            close(FIND);
  +            chomp(@pmfiles);
  +    
  +            # Search through each PM file
  +            foreach $pmfile (@pmfiles) {
  +    
  +                next if ($file_seen{$pmfile});
  +
  +                $module = $pmfile;
  +                $module =~ s!^$incdir/!!;
  +                $module =~ s!\.pm$!!;
  +
  +                next if ($module =~ m!^site_perl/! || $module =~ m!^$archname/! ||
  +                         $module =~ m!^$perlversion/! || $module =~ m!^[0-9.]+/! || 
$module =~ m!^blib/!);
  +                $file_seen{$pmfile} = 1;
  +
  +                $module =~ s!/!::!g;
  +                #print "PM file: $pmfile => $module\n";
  +                #&write_pod2html($pmfile, $dir, $module, $docroot);
  +    
  +                #&scan_source($pmfile, $module);
  +            }
  +        }
  +    }
  +    #exit (0);
  +
  +    #############################################################################
       # Scan .pod and .pm files
       #############################################################################
   
  @@ -239,7 +349,7 @@
           my ($title, $short_title, $top_navbar, $class);
   
           # replace this with the Perl version of "find" someday
  -        open (FIND, "find $dir -name '*.html' -print |") || die "Unable to get file 
list: $!\n";
  +        open (FIND, "find $dir/[A-Z]* -name '*.html' -print |") || die "Unable to 
get file list: $!\n";
           @htmlfiles = <FIND>;
           close(FIND);
           chomp(@htmlfiles);
  @@ -1329,6 +1439,30 @@
   EOF
   
       $html;
  +}
  +
  +use File::Basename;
  +use File::Path qw(mkpath);
  +
  +sub write_pod2html {
  +    my ($file, $htmldir, $module, $docroot) = @_;
  +    my ($htmlfile, $dir);
  +
  +    $htmlfile = "$htmldir/$module.html";
  +    $htmlfile =~ s!::!/!g;
  +
  +    $dir = dirname($htmlfile);
  +    mkpath($dir) unless (-d $dir);
  +
  +    if (! -e $htmlfile || -M $htmlfile < -M $file) {
  +        system("pod2html --htmlroot=$docroot --infile=$file --outfile=$htmlfile");
  +        if (-e $htmlfile) {
  +            print "Wrote POD of $module to $htmlfile.\n";
  +        }
  +        else {
  +            print "Failed writing POD of $module to $htmlfile.\n";
  +        }
  +    }
   }
   
   sub read_file {
  
  
  


Reply via email to