Alvis-Bags

 view release on metacpan or  search on metacpan

bin/linkBags  view on Meta::CPAN


#  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 = "";
my $file = "";
my $linktext = 0;
my $titletext = 0;
my $update = 0;

# shared vars

bin/linkMpca  view on Meta::CPAN


###################### 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; 

my $reporting = 0;
my $norank = 0;
my $onerank = 0;
my $stem = "";

bin/linkRedir  view on Meta::CPAN

#       ignores fragments too

use strict;
use POSIX;
use HTML::Entities;
use Alvis::URLs;
use Getopt::Long;
use Pod::Usage;

# encoding pragmas follow any includes like "use"
use encoding 'utf8';
use open ':utf8';
binmode STDOUT, ":utf8";
binmode STDIN, ":utf8";

my $usezip = "";
my $init = 0;

#  both hash tables only store URLs cleaned with StandardURL()
#  single redirect for a URL
my %redirect = ();
#  space delimited set of entries with same target
my %direct = ();

bin/linkTables  view on Meta::CPAN


use strict;
use POSIX;
use HTML::Entities;
use Alvis::URLs;
use Getopt::Long;
use Pod::Usage;


# encoding pragmas follow any includes like "use"
use encoding 'utf8';
use open ':utf8';
binmode STDIN, ":utf8";
binmode STDERR, ":utf8";

#  ensure sort handles UTF8 order
my $SORTCODE = "LC_ALL=en_US.UTF-8; export LC_ALL;" ;

my $MINCOUNT = 1;
my $linktext = 0;
my $titletext = 0;
my $stopfile = "";
my $fixdocs = 0;    # set this to fix everything but .docs 
my %stops = ();

lib/Alvis/URLs.pm  view on Meta::CPAN


############ END CONFIGURATION ######################

use Digest::MD5 qw(md5_hex);
use strict;
use POSIX;
use Encode;
use URI;

# encoding pragmas follow any includes like "use"
use encoding 'utf8';
use open ':utf8';

#  return 32-bit unsigned
sub easyhash32
{
  my $string = shift;
  Encode::_utf8_off($string);
  my $dig = md5_hex($string);
  # print $dig . " \n";
  return POSIX::strtol(substr($dig,0,8),16);
}

#  return 64-bit unsigned
sub easyhash64char
{
  my $string = shift;
  Encode::_utf8_off($string);
  my $dig = md5_hex($string);
  # print $dig . " \n";
  return substr($dig,0,16);
}

#  URL switches
$Alvis::URLs::nocase = 0;
$Alvis::URLs::noclean = 0;
$Alvis::URLs::keepfrag = 0;



( run in 1.845 second using v1.01-cache-2.11-cpan-49f99fa48dc )