Changeset 29161

Show
Ignore:
Timestamp:
24.07.2014 14:13:19 (5 years ago)
Author:
jmt12
Message:

Some modules aren't availalbe on cluster... add test and include path to extensions CPAN library as necessary

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/perllib/plugins/CPULoadTextPlugin.pm

    r28649 r29161  
    77no strict 'subs'; 
    88 
     9sub BEGIN 
     10{ 
     11  @CPULoadTextPlugin::ISA = ('TextPlugin'); 
     12 
     13  eval('use Crypt::Blowfish_PP'); 
     14  if ($@) 
     15  { 
     16    # We need the Perl version before continuing 
     17    if (!defined $ENV{'PERL_VERSION'}) 
     18    { 
     19      $ENV{'PERL_VERSION'} = `perl -S $ENV{'GEXTPARALLELBUILDING'}/bin/script/perl-version.pl`; 
     20    } 
     21    die "PERL_VERSION not set\n" unless defined $ENV{'PERL_VERSION'}; 
     22    # Crypt::Blowfish_PP module 
     23    unshift (@INC, $ENV{'GEXTPARALLELBUILDING'} . '/' . $ENV{'GSDLOS'} . '/lib/perl/' . $ENV{'PERL_VERSION'}); 
     24  } 
     25} 
     26 
    927use Crypt::Blowfish_PP; 
    1028use Kea; 
    1129use Lingua::EN::Syllable; 
    12  
    13 sub BEGIN { 
    14     @CPULoadTextPlugin::ISA = ('TextPlugin'); 
    15 } 
    1630 
    1731our $cpu_load_list = [ { 'name' => "none", 
     
    98112    $self->{'first'} = '80,256,1024'; 
    99113    $self->generateSummaries($doc_obj, $textref); 
     114    $self->{'first'} = undef; 
    100115    $self->generateComplexity($doc_obj, $textref); 
    101116    $self->generateEncryptedText($doc_obj, $textref, 'thePassword'); 
     
    249264  my ($doc_obj, $text) = @_; 
    250265  my $raw_lexicon = {}; 
    251   my @words = split('/[\,\.\s]+/', $text); 
     266  my @words = split(/[\,\.\s]+/, $text); 
    252267  foreach my $word (@words) 
    253268  {