Ignore:
Timestamp:
2004-10-07T10:56:16+13:00 (20 years ago)
Author:
jrm21
Message:

all perl things should "use strict;" to catch errors!

$cursection was being used without being defined.

File:
1 edited

Legend:

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

    r8226 r8227  
    2323#
    2424###########################################################################
     25use strict;
     26no strict 'refs'; # so we can use a var for filehandles (eg STDERR)
    2527
    2628package PDFPlug;
     
    2931use unicode;
    3032
    31 sub BEGIN {
    32     @ISA = ('ConvertToPlug');
    33 }
     33@PDFPlug::ISA = ('ConvertToPlug');
    3434
    3535my $arguments =
     
    8282             "allow_extra_options")) {
    8383
    84     local $self = new ConvertToPlug($class, @_, "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
     84    my $self = new ConvertToPlug($class, @_);
    8585    my $outhandle=$self->{'outhandle'};
    8686    print $outhandle "\nIncorrect options passed to PDFPlug, check your collect.cfg configuration file\n";
     
    213213    # fix up the extracted date metadata to be in Greenstone date format,
    214214    # and fix the capitalisation of 'date'
    215     foreach $datemeta (@{$doc_obj->get_metadata($cursection, "date")}) {
     215    my $cursection = $doc_obj->get_top_section();
     216
     217    foreach my $datemeta (@{$doc_obj->get_metadata($cursection, "date")}) {
    216218    $doc_obj->delete_metadata($cursection, "date", $datemeta);
    217219
Note: See TracChangeset for help on using the changeset viewer.