Next Making Programs Faster 61

Pod::ParseTree::append

        sub append {
           my $self = shift;
           local *ptree = $self;
           for (@_) {
              next  unless length;
              if (@ptree  and  !(ref $ptree[-1])  and  !(ref $_)) {
                 $ptree[-1] .= $_;
              }
              else {
                 push @ptree, $_;
              }
           }
        }
        sub append {
          my $self = shift;
          push @$self, @_;
        }

Next Copyright © 2003 M. J. Dominus