/[papo]/papo/neb/neb/Tree/Container.pm
ViewVC logotype

Diff of /papo/neb/neb/Tree/Container.pm

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

revision 1.5 by jlenton, Thu Apr 10 23:01:39 2003 UTC revision 1.6 by fheinz, Mon Apr 14 19:38:27 2003 UTC
# Line 8  sub init Line 8  sub init
8      my $self = shift;      my $self = shift;
9      my $location = shift;      my $location = shift;
10    
11        $self->SUPER::init(@_);
12      $self->location($location)      $self->location($location)
13          if defined($location);          if defined($location);
14    
# Line 77  sub code Line 78  sub code
78      return join ('', map $_->code, $self->content);      return join ('', map $_->code, $self->content);
79  }  }
80    
81    # Morph the tree into what we really want to output
82    sub cleanup
83    {
84        my $self = shift;
85        my $content_array = $self->content;
86    
87        # We must do the replacement from the back to the front, because a single element
88        # may be replaced by none (or by many) at cleanup
89        splice(@$content_array, $_, 1) = $$content_array[$_]->cleanup foreach reverse 0..$#{$content_array};
90        return ($self);
91    }
92    
93  1;  1;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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