Ignore:
Timestamp:
2005-07-19T16:27:51+12:00 (19 years ago)
Author:
kjdon
Message:

added 'use strict' to all plugins, and made modifications (mostly adding 'my') to make them compile

File:
1 edited

Legend:

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

    r10218 r10254  
    3232use BasPlug;
    3333use parsargv;
     34use strict;
     35no strict 'refs'; # allow filehandles to be variables and viceversa
    3436
    3537sub BEGIN {
     
    7880    my $outhandle = $self->{'outhandle'};
    7981
     82    my $section = $doc_obj->get_top_section();
    8083    print STDERR "<Processing n='$file' p='FavouritesPlug'>\n" if ($gli);
    8184    print $outhandle "FavouritesPlug: processing $file\n" if $self->{'verbosity'} > 1;
     
    8790    my $title = $file;
    8891    $title =~ s/.url$//i;
    89     $doc_obj->add_utf8_metadata($cursection, "Title", $title);
     92    $doc_obj->add_utf8_metadata($section, "Title", $title);
    9093
    9194    # get the URL from the file
    9295    my ($url) = ($$textref =~ m/^URL=(http.+)/mg);
    93     $doc_obj->add_metadata($cursection, "URL", $url);
     96    $doc_obj->add_metadata($section, "URL", $url);
    9497
    9598    # Add srclink metadata for an automatic link to the webpage
     
    103106    $$textref =~ s/\]/<\/strong><p>/g;
    104107    $$textref =~ s/^Modified=(.+)$/<strong>Modified<\/strong>$1<p>/g;
    105     $doc_obj->add_utf8_text($cursection, "$$textref");
     108    $doc_obj->add_utf8_text($section, "$$textref");
    106109
    107     $doc_obj->add_metadata($cursection, "FileFormat", "Favourite");
     110    $doc_obj->add_metadata($section, "FileFormat", "Favourite");
    108111    return 1;
    109112}
Note: See TracChangeset for help on using the changeset viewer.