/[bibulus]/bibulus/Bibulus.pm
ViewVC logotype

Diff of /bibulus/Bibulus.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.23 by twid, Mon Jul 21 12:52:42 2003 UTC revision 1.24 by twid, Sat Sep 6 20:22:55 2003 UTC
# Line 33  sub new { Line 33  sub new {
33    # tell what you're doing!    # tell what you're doing!
34    $self->verbose(1);    $self->verbose(1);
35    
36      # set default language:
37    $self->lang('en');    $self->lang('en');
38    
39    return $self;    return $self;
40  }  }
41    
42    # main program logic
43    sub getbib {
44      my $self = shift;
45      $self->allfound;
46      $self->doinlinecrossref;
47      $self->gensortkeys;
48      $self->sortbib;
49      $self->labels;
50      return $self->genbib;
51    }
52    
53  # set verbosity:  # set verbosity:
54  sub verbose {  sub verbose {
55    my $self = shift;    my $self = shift;
# Line 76  sub doinlinecrossref { Line 88  sub doinlinecrossref {
88    foreach my $n (0..$#{$self->{EL}}) {    foreach my $n (0..$#{$self->{EL}}) {
89      my $i = $self->{EL}[$n];      my $i = $self->{EL}[$n];
90      my $id = $i->id;      my $id = $i->id;
91    
92        unless (defined($id)) {
93            print STDERR "ID not defined.\n";
94            next;
95        }
96    
97      print "Including $id\n" if $DEBUG;      print "Including $id\n" if $DEBUG;
98      if ($self->{CITES}{$id} != 0) { # crossref'ed entries      if ($self->{CITES}{$id} != 0) { # crossref'ed entries
99    
# Line 121  sub doinlinecrossref { Line 139  sub doinlinecrossref {
139    @{$self->{EL}} = grep {!defined($willdie{$_})} @{$self->{EL}};    @{$self->{EL}} = grep {!defined($willdie{$_})} @{$self->{EL}};
140  }  }
141    
 # main program logic  
 sub getbib {  
   my $self = shift;  
   $self->allfound;  
   $self->doinlinecrossref;  
   $self->gensortkeys;  
   $self->sortbib;  
   $self->labels;  
   return $self->genbib;  
 }  
   
142  # Check whether all cited titles were found;  # Check whether all cited titles were found;
143  # return 1 if all were there, 0 otherwise;  # return 1 if all were there, 0 otherwise;
144  # print warnings for everything not found.  # print warnings for everything not found.
# Line 284  sub genbib { Line 291  sub genbib {
291    my $t;    my $t;
292    $t = $self->bibliography_start();    $t = $self->bibliography_start();
293    foreach $i (@{$self->{EL}}) {    foreach $i (@{$self->{EL}}) {
294      $t .= $self->formatentry($i);      my $tmp = $self->formatentry($i);
295        $t .= $tmp if defined($tmp);
296    }    }
297    $t .= $self->bibliography_end();    $t .= $self->bibliography_end();
298    return $t;    return $t;

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26