/[webpac]/trunk2/lib/WebPAC/jsFind.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk2/lib/WebPAC/jsFind.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 444 by dpavlin, Sun Sep 5 21:25:10 2004 UTC revision 445 by dpavlin, Tue Sep 14 21:02:28 2004 UTC
# Line 145  This method will dump indexes to disk. Line 145  This method will dump indexes to disk.
145  This method will create directories if needed and store tree xml files  This method will create directories if needed and store tree xml files
146  for all indexes.  for all indexes.
147    
148    Turning debugging for this function by inserting
149    
150      log4perl.logger.WebPAC.jsFind.close=DEBUG
151    
152    into C<log.conf> will also result in creation of GraphViz C<.dot> files
153    for each index in current directory.
154    
155  =cut  =cut
156    
# Line 159  sub close { Line 165  sub close {
165                  $log->debug("saving index '$index_name' xml files to '$path'");                  $log->debug("saving index '$index_name' xml files to '$path'");
166    
167                  $self->tree($index_name)->to_jsfind($path,'ISO-8859-2','UTF-8');                  $self->tree($index_name)->to_jsfind($path,'ISO-8859-2','UTF-8');
168    
169                    if ($log->is_debug()) {
170                            my $dot_file = $index_name.".dot";
171                    
172                            $log->debug("saving graphviz file for '$index_name' to '$dot_file'");
173    
174                            open(DOT, ">", $dot_file) || $log->logdie("can't open '$dot_file': $!");
175                            print DOT $self->tree($index_name)->to_dot;
176                            close(DOT);
177                    }
178          }          }
179    
180  }  }

Legend:
Removed from v.444  
changed lines
  Added in v.445

  ViewVC Help
Powered by ViewVC 1.1.26