stas        2002/11/14 09:45:31

  Modified:    lib/DocSet DocSet.pm NavigateCache.pm
               lib/DocSet/DocSet HTML.pm
  Log:
  DocSet sync:
  - fix a missing dependency: the modified() is set for the index.html
    objects when any of the index_(top|bottom) attributes's files are
    newer than the autogenerated index.html based on any of these files.
  
  - Fix DocSet::NavigateCache::new() to properly handle docsets with no
    nodes
  
  - in DocSet::5005compat added a workaround for a bug in
    ExtUtils::MakeMaker v < 6.00, which tries to parse any word which
    include VERSION in it, which causes problems when you do 'r' in
    CPAN.pm. Thanks to Mark Veltzer for reporting the problem.
  
  Revision  Changes    Path
  1.15      +16 -0     modperl-docs/lib/DocSet/DocSet.pm
  
  Index: DocSet.pm
  ===================================================================
  RCS file: /home/cvs/modperl-docs/lib/DocSet/DocSet.pm,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DocSet.pm 19 Aug 2002 06:56:44 -0000      1.14
  +++ DocSet.pm 14 Nov 2002 17:45:31 -0000      1.15
  @@ -9,6 +9,8 @@
   use DocSet::Doc ();
   use DocSet::NavigateCache ();
   
  +use File::Spec::Functions;
  +
   use vars qw(@ISA);
   use DocSet::Config ();
   @ISA = qw(DocSet::Config);
  @@ -169,6 +171,20 @@
       my($should_update, $reason) = 
           $self->should_update($config_file, $dst_index);
       $self->modified(1) if $should_update;
  +
  +    # if @body{qw(top bot)} component files exist, check whether they
  +    # are newer than the target index.html file
  +    if (my $body = $self->get('body')) {
  +        my $src_root = $self->get_dir('src_root');
  +        for my $sec (qw(top bot)) {
  +            my $src_file = $body->{$sec};
  +            next unless $src_file;
  +            $src_file = catfile $src_root, $src_file;
  +            my($should_update, $reason) = 
  +                $self->should_update($src_file, $dst_index);
  +            $self->modified(1) if $should_update;
  +        }
  +    }
   
       # sync the cache
       $cache->write;
  
  
  
  1.6       +5 -2      modperl-docs/lib/DocSet/NavigateCache.pm
  
  Index: NavigateCache.pm
  ===================================================================
  RCS file: /home/cvs/modperl-docs/lib/DocSet/NavigateCache.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- NavigateCache.pm  29 Jun 2002 19:13:49 -0000      1.5
  +++ NavigateCache.pm  14 Nov 2002 17:45:31 -0000      1.6
  @@ -33,8 +33,11 @@
       $self->[CUR_PATH]    = $cache_path;
       $self->[REL_PATH]    = $rel_path if $rel_path;
   
  -    # get the first (#0) node if id wasn't provided
  -    $self->[ID] = defined $id ? $id : $cache->seq2id(0);
  +    # get the first (#0) node if id wasn't provided (if there are any
  +    # nodes at all)
  +    $self->[ID] = defined $id 
  +        ? $id 
  +        : $cache->total_ids ? $cache->seq2id(0) : undef;
       return undef unless defined $self->[ID]; # an empty docset
   
       return $self;
  
  
  
  1.9       +1 -1      modperl-docs/lib/DocSet/DocSet/HTML.pm
  
  Index: HTML.pm
  ===================================================================
  RCS file: /home/cvs/modperl-docs/lib/DocSet/DocSet/HTML.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- HTML.pm   30 Jun 2002 15:52:41 -0000      1.8
  +++ HTML.pm   14 Nov 2002 17:45:31 -0000      1.9
  @@ -160,7 +160,7 @@
                   tmpl_mode    => $self->get('tmpl_mode'),
                   tmpl_root    => $self->get_dir('tmpl'),
                   src_uri      => $src_file,
  -                src_path     => "$src_root/$src_file",
  +                src_path     => catfile($src_root, $src_file),
               );
               $chapter->scan();
               $args{body}{$sec} = $chapter->converted_body();
  
  
  

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

Reply via email to