/[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 3 by dpavlin, Sun Sep 20 18:55:34 2009 UTC revision 4 by dpavlin, Sun Sep 20 20:08:11 2009 UTC
# Line 6  use strict; Line 6  use strict;
6  use Time::HiRes qw(time);  use Time::HiRes qw(time);
7  use Data::Dump qw(dump);  use Data::Dump qw(dump);
8  use File::Slurp;  use File::Slurp;
9    use Getopt::Long;
10    
11    
12    my $path   = '/data/isi/full.txt';
13    my $limit  = 10000;
14    my $offset = 0;
15    
 my $t = time;  
16    
17    GetOptions(
18            'path=s'   => \$path,
19            'offset=i' => \$offset,
20            'limit=i'  => \$limit,
21    );
22    
23    my $t = time;
24    
25  use lib '/srv/webpac2/lib/';  use lib '/srv/webpac2/lib/';
26  use WebPAC::Input::ISI;  use WebPAC::Input::ISI;
27  my $input = WebPAC::Input::ISI->new(  my $input = WebPAC::Input::ISI->new(
28          path  => '/data/isi/full.txt',          path   => $path,
29          limit => shift @ARGV || 1000,          offset => $offset,
30            limit  => $limit,
31  );  );
32    
33    
# Line 60  sub run_views { Line 73  sub run_views {
73                          my $dump = dump $out;                          my $dump = dump $out;
74                          my $len  = length $dump;                          my $len  = length $dump;
75                          my $path = "out/$nr.$package";                          my $path = "out/$nr.$package";
76                          print "# $view $len bytes $path"                          print "# $view $offset/$limit $len bytes $path"
77                                  , $len < 10000 ?  " \$out = $dump" : ' SAVED ONLY'                                  , $len < 10000 ?  " \$out = $dump" : ' SAVED ONLY'
78                                  , "\n"                                  , "\n"
79                                  ;                                  ;

Legend:
Removed from v.3  
changed lines
  Added in v.4

  ViewVC Help
Powered by ViewVC 1.1.26