Changeset 838 for trunk


Ignore:
Timestamp:
1999-12-13T16:56:11+13:00 (24 years ago)
Author:
davidb
Message:

added options passed into 'new' subroutine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/classify/SectionList.pm

    r677 r838  
    9595sub classify {
    9696    my $self = shift (@_);
    97     my ($doc_obj) = @_;
    98 
    99     my $thissection = $doc_obj->get_next_section ($doc_obj->get_top_section());
     97    my ($doc_obj,@options) = @_;
     98   
     99    my $thissection = undef;
     100
     101    my $option;
     102    foreach $option (@options)
     103    {
     104    if ($option =~ m/^section=(\d+)$/i)
     105    {
     106        $thissection = $1;
     107    }
     108    }
    100109
    101110    my $sortmeta = "";
     
    115124    }
    116125
    117     while (defined $thissection) {
     126    if (!defined $thissection)
     127    {
     128    $thissection = $doc_obj->get_next_section ($doc_obj->get_top_section());
     129    while (defined $thissection) {
     130        $self->classify_section($thissection, $doc_obj, $sortmeta);
     131        $thissection = $doc_obj->get_next_section ($thissection);
     132    }
     133    }
     134    else
     135    {
    118136    $self->classify_section($thissection, $doc_obj, $sortmeta);
    119     $thissection = $doc_obj->get_next_section ($thissection);
    120137    }
    121138}
Note: See TracChangeset for help on using the changeset viewer.