Alvis-Bags
view release on metacpan or search on metacpan
bin/linkBags view on Meta::CPAN
use IO::Handle;
###################### CONFIGURATION #####################
# ensure sort handles UTF8 order
my $SORTCODE = "LC_ALL=en_US.UTF-8; export LC_ALL;" ;
############ END CONFIGURATION ######################
# autoflush
select((select(STDERR), $| = 1)[0]);
# encoding pragmas follow any includes like "use"
use encoding 'utf8';
use open ':utf8';
binmode STDIN, ":utf8";
binmode STDERR, ":utf8";
# command line inputs
my $gzip = 0;
my $stem = "";
bin/linkBags view on Meta::CPAN
}
# bags generated with the document number to assist sorting;
# sorts the bags prior to saving, and cut out the document number
open(IN,"<$file");
&MakeBags();
close(IN);
close(OUT);
# we want to write to the front of the file,
# without destroying rest of contents, this open does it
sysopen(OUT, $tfile, O_RDWR) or die "Cannot reopen $tfile: $!";
my $oldfh = select(OUT); $| = 1; select($oldfh);
# now, rewrite header
print OUT sprintf("%8d\n%8d\n", $doccount, $featcount);
close(OUT);
print STDERR "\nNow build the document bags with mpdata\n";
print STDERR "=========================================\n";
open(OUT,">$stem.cnf");
print OUT "#\nindexdensity=10\ninput=\"$stem.txtbag\"\nbaggedinput\n";
if ( $update ) {
print OUT "update\n";
bin/linkMpca view on Meta::CPAN
use IO::Handle;
use Getopt::Long;
use Pod::Usage;
###################### CONFIGURATION #####################
############ END CONFIGURATION ######################
# autoflush
select((select(STDERR), $| = 1)[0]);
# encoding pragmas follow any includes like "use"
use encoding 'utf8';
use open ':utf8';
# build MPCA components, 1 is "no", must be the default
my $COMPS = 1;
# number of entries per component per report
my $MAXREP = 50;
( run in 0.961 second using v1.01-cache-2.11-cpan-49f99fa48dc )