Changeset 15887


Ignore:
Timestamp:
2008-06-06T10:36:57+12:00 (16 years ago)
Author:
mdewsnip
Message:

Added "use strict" to the few files that were missing it, and fixing resulting problems in MediaWikiPlug.pm.

Location:
gsdl/trunk/perllib/plugins
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/AcronymExtractor.pm

    r15881 r15887  
    33use acronym;
    44use PrintInfo;
     5use strict;
    56
    67BEGIN {
  • gsdl/trunk/perllib/plugins/DateExtractor.pm

    r15881 r15887  
    33use DateExtract;
    44use PrintInfo;
     5use strict;
    56
    67BEGIN {
  • gsdl/trunk/perllib/plugins/EmailAddressExtractor.pm

    r15881 r15887  
    22
    33use PrintInfo;
     4use strict;
    45
    56BEGIN {
  • gsdl/trunk/perllib/plugins/KeyphraseExtractor.pm

    r15881 r15887  
    33use Kea;
    44use PrintInfo;
     5use strict;
     6no strict 'subs';
    57
    68BEGIN {
  • gsdl/trunk/perllib/plugins/MediaWikiPlugin.pm

    r15872 r15887  
    3434
    3535use HTMLPlugin;
    36 # use ImagePlugin;
    37 # use File::Copy;
    3836use unicode;
    3937
    40 
    41 #use strict; # every perl program should have this!
    42 #no strict 'refs'; # make an exception so we can use variables as filehandles
     38use strict; # every perl program should have this!
     39no strict 'refs'; # make an exception so we can use variables as filehandles
     40
    4341
    4442sub BEGIN {
     
    508506        elsif ($about_package !~ /\S/) {         
    509507          # read _content_ macro from $GSDLHOME/macros/about.dm file         
    510       my $global_about_package = &read_content_from_about_dm();     
     508      my $global_about_package = $self->read_content_from_about_dm();       
    511509           
    512510          # create the extra _content_ macro for this collection           
     
    539537          else {
    540538            my $new_about_package = $about_package;           
    541             $content_macro = &read_content_from_about_dm();
     539            my $content_macro = &read_content_from_about_dm();
    542540            $content_macro =~ m/{(.|\n)*<\/div>\n\n/;           
    543541           
     
    646644sub read_content_from_about_dm
    647645{
     646    my $self = shift(@_);
     647
    648648  my $about_macro_file = &util::filename_cat($ENV{'GSDLHOME'}, "macros", "about.dm");
    649649  my $about_page_content = "";
     
    653653    }
    654654  } else {
     655      my $outhandle = $self->{'outhandle'};
    655656    print $outhandle "can't open file $about_macro_file\n";
    656657  }         
Note: See TracChangeset for help on using the changeset viewer.