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

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

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

revision 1.2 by jlenton, Tue Apr 8 00:23:11 2003 UTC revision 1.3 by jlenton, Wed Apr 9 15:29:14 2003 UTC
# Line 5  use neb::Tree::Node; Line 5  use neb::Tree::Node;
5  use neb::Tree::Container;  use neb::Tree::Container;
6    
7  our @ISA = ('neb::Tree::Node');  our @ISA = ('neb::Tree::Node');
8    our $DEBUG;
9    
10  sub init  sub init
11  {  {
# Line 13  sub init Line 14  sub init
14      $self->{ATTRS} = {};      $self->{ATTRS} = {};
15      $self->{CONTAINER} = new neb::Tree::Container;      $self->{CONTAINER} = new neb::Tree::Container;
16      $self->{CONTAINER}->parent($self);      $self->{CONTAINER}->parent($self);
17    
18        $DEBUG = $main::DEBUG;
19  }  }
20    
21  sub name  sub name
# Line 90  sub canonical_start Line 93  sub canonical_start
93  sub canonical_end  sub canonical_end
94  {  {
95      my $self = shift;      my $self = shift;
96      return '</' . $self->name . '>';      return '</' . $self->name . ($self->attribute('name') ? " " . $self->attribute('name') : '' ) . '>';
97  }  }
98    
99    
# Line 98  sub code_start Line 101  sub code_start
101  {  {
102      my $self = shift;      my $self = shift;
103      my %h = $self->attributes;      my %h = $self->attributes;
104      my $code = '$OUTPUT .= "<' . $self->name;      my $code = '';
105    
106        $code .= "# Tag::code_start:\n\t" if ($DEBUG);
107        $code .= '$OUTPUT .= "<' . $self->name;
108    
109      foreach (keys %h)      foreach (keys %h)
110      {      {
# Line 121  sub code_end Line 127  sub code_end
127  {  {
128      my $self = shift;      my $self = shift;
129    
130      return sprintf ("\$OUTPUT .= \"%s\";\n",      my $code = '';
131                      $self->canonical_end);  
132        $code .= "# Tag::code_end:\n\t" if ($DEBUG);
133    
134        $code .= sprintf ("\$OUTPUT .= \"%s\";\n", $self->canonical_end);
135    
136        return $code;
137  }  }
138    
139  sub code  sub code

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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