/[Sack]/trunk/bin/sack.pl
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 /trunk/bin/sack.pl

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

revision 44 by dpavlin, Thu Sep 24 00:00:24 2009 UTC revision 45 by dpavlin, Thu Sep 24 13:37:53 2009 UTC
# Line 57  sub BEGIN { Line 57  sub BEGIN {
57    
58  use lib "$prefix/srv/Sack/lib/";  use lib "$prefix/srv/Sack/lib/";
59  use Sack::Digest;  use Sack::Digest;
60  Sack::Digest->clean;  our $digest = Sack::Digest->new( port => $port, clean => 1 );
61  Sack::Digest->open( $port );  sub digest { $digest->to_int($_[0]) }
 sub digest { Sack::Digest->to_int($_[0]) }  
62    
63  use lib "$prefix/srv/webpac2/lib/";  use lib "$prefix/srv/webpac2/lib/";
64  use WebPAC::Input::ISI;  use WebPAC::Input::ISI;
# Line 243  sub run_views { Line 242  sub run_views {
242                          report "[$port] SAVE $path $offset-$limit", -s $path, "bytes";                          report "[$port] SAVE $path $offset-$limit", -s $path, "bytes";
243    
244                          if ( -s $path < 4096 ) {                          if ( -s $path < 4096 ) {
245                                  print '$out = ', dump Sack::Digest->undigest_out($out);                                  print '$out = ', dump $digest->undigest_out($out);
246                          }                          }
247                  }                  }
248    
# Line 342  Sacks Lorry v$VERSION - path: $path offs Line 341  Sacks Lorry v$VERSION - path: $path offs
341  __HELP__  __HELP__
342          } elsif ( $cmd =~ m{^(vi|\\e|o)}i ) {          } elsif ( $cmd =~ m{^(vi|\\e|o)}i ) {
343                  #system "vi out/*";                  #system "vi out/*";
344                  Sack::Digest->sync;                  $digest->sync;
345                  system "bin/storableedit.pl", (glob('out/*.storable'))[0];                  system "bin/storableedit.pl", (glob('out/*.storable'))[0];
346          } elsif ( $cmd =~ m{^i(?:nfo)?\s?(.+)?$}i ) {          } elsif ( $cmd =~ m{^i(?:nfo)?\s?(.+)?$}i ) {
347                  info;                  info;

Legend:
Removed from v.44  
changed lines
  Added in v.45

  ViewVC Help
Powered by ViewVC 1.1.26