[interchange-cvs] interchange - heins modified lib/Vend/Parse.pm
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Thu Aug 1 23:08:00 2002
User: heins
Date: 2002-08-02 03:07:32 GMT
Modified: lib/Vend Parse.pm
Log:
* Fix problems with [goto LABEL].
-- Remove old HTML-style tag recognition.
-- No longer use old $Initialized->{_buf}.
Revision Changes Path
2.20 +9 -22 interchange/lib/Vend/Parse.pm
rev 2.20, prev_rev 2.19
Index: Parse.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /anon_cvs/repository/interchange/lib/Vend/Parse.pm,v
retrieving revision 2.19
retrieving revision 2.20
diff -u -r2.19 -r2.20
--- Parse.pm 20 Jul 2002 14:56:08 -0000 2.19
+++ Parse.pm 2 Aug 2002 03:07:32 -0000 2.20
@@ -1,6 +1,6 @@
# Vend::Parse - Parse Interchange tags
#=20
-# $Id: Parse.pm,v 2.19 2002/07/20 14:56:08 mheins Exp $
+# $Id: Parse.pm,v 2.20 2002/08/02 03:07:32 mheins Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -35,7 +35,7 @@
=20
@ISA =3D qw(Exporter Vend::Parser);
=20
-$VERSION =3D substr(q$Revision: 2.19 $, 10);
+$VERSION =3D substr(q$Revision: 2.20 $, 10);
=20
@EXPORT =3D ();
@EXPORT_OK =3D qw(find_matching_end);
@@ -480,24 +480,11 @@
$$buf =3D '';
return;
}
- while($$buf =3D~ s! .+?
- (
- (?:
- \[ label \s+ (?:name \s* =3D \s* ["']?)? |
- <[^>]+? \s+ mv.label \s*=3D\s*["']? |
- <[^>]+? \s+
- mv \s*=3D\s*["']? label
- [^>]*? \s+ mv.name\s*=3D\s*["']? |
- <[^>]+? \s+ mv \s*=3D\s*["']? label \s+ |
- )
- (\w+)
- |
- </body\s*>
- )
- !$1!ixs )
- {
- last if $name eq $2;
- }
+ $$buf =3D~ s!.*?\[label\s+(?:name\s*=3D\s*(?:["'])?)?($name)['"]*\s*\]!!is
+ and return;
+ $$buf =3D~ s:.*?</body\s*>::is
+ and return;
+ $$buf =3D '';
return;
# syntax color "'
}
@@ -638,9 +625,9 @@
if $attr->{abort};
return ($self->{SEND} =3D 1);
}
- goto_buf($args[0], \$Initialized->{_buf});
+ goto_buf($args[0], $buf);
$self->{ABORT} =3D 1;
- $self->{SEND} =3D 1 if ! $Initialized->{_buf};
+ $self->{SEND} =3D 1 if ! $$buf;
return 1;
}
elsif($tag eq 'bounce') {