Changeset 22632

Show
Ignore:
Timestamp:
13.08.2010 16:52:49 (9 years ago)
Author:
mdewsnip
Message:

Changed "use textcat" to a "require textcat", so it is only loaded if it is actually required.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/BasePlugin.pm

    r22427 r22632  
    3434use encodings; 
    3535use unicode; 
    36 use textcat; 
    3736use doc; 
    3837use ghtml; 
     
    684683    
    685684    # get the language/encoding of the textstring using textcat 
     685    require textcat;  # Only load the textcat module if it is required 
    686686    $self->{'textcat'} = new textcat() unless defined($self->{'textcat'}); 
    687687    my $results = $self->{'textcat'}->classify_cached_filename(\$text);