105 |
|
|
106 |
|
# Start file processing |
107 |
|
while ( ($_=<$filehandle>) ) { |
108 |
+ |
# Skip lines that start with a hash. A better way |
109 |
+ |
# of adding comments than ignore tags: |
110 |
+ |
next if (/^#/); |
111 |
|
$self->{linecount}++; |
112 |
|
$self->{currentline}=$_; |
113 |
|
$self->{stringpos}=0; |
119 |
|
# make sure we close the last buffer |
120 |
|
$self->_calltag($self->{textcontext}, $self->{textcontext}, |
121 |
|
$self->_getstore()); |
119 |
– |
#$self->_printstream(); |
122 |
|
} |
123 |
|
|
124 |
|
# |
213 |
|
$self->{tagcontext}="starttag"; |
214 |
|
$self->_checkchar($char); |
215 |
|
} |
214 |
– |
# print "\nDebug : Opening $self->{tagcontext}\n"; |
216 |
|
} |
217 |
|
|
218 |
|
# |
230 |
|
$tagroutine=$self->{tagname}."_".$self->{tagcontext}; |
231 |
|
$self->_calltag($tagroutine, $self->{tagname}, |
232 |
|
$self->{tagvar}); |
232 |
– |
#print "\nDebug : Closing Tag $tagroutine\n"; |
233 |
|
|
234 |
|
# -- Now make sure the text context is set for calling routines to |
235 |
|
# -- deal with text portions outside of tags |
322 |
|
my $this; |
323 |
|
|
324 |
|
undef @tempstack; |
325 |
– |
#print "In ----".$#{$stack}; |
325 |
|
# Keep popping until we find our string |
326 |
|
while ( ($this=(pop @{$stack})) ne "$name") { |
327 |
|
push @tempstack, $this; |
332 |
|
$this=pop @tempstack; |
333 |
|
push @{$stack}, $this; |
334 |
|
} |
336 |
– |
#print " Out ----".$#{$stack}; |
335 |
|
} |
336 |
|
|
337 |
|
# |