[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mason-devel
Subject:    Re: [Mason-devel] Patch mason-0-8-branch: insert \Q...\E
From:       Dave Rolsky <autarch () urth ! org>
Date:       2000-10-12 1:12:01
[Download RAW message or body]

On 11 Oct 2000, John Tobey wrote:

> @@ -259,7 +259,7 @@
>  				   startline => $startline )
>  		if $curpos < $section_tag_pos;
>  
> -	    if ($script =~ m/(<\/%(?:perl_)?$section_name>\n?)/ig) {
> +	    if ($script =~ m/(<\/%(?:perl_)?\Q$section_name\E>\n?)/ig) {
>  		my $ending_tag = $1;
>  		my $section_end = pos($script) - length($ending_tag);
>  		my $section = substr($script, $section_start, $section_end - $section_start);

I don't understand why you think this needs meta-quoting?  $section_name
is something that can be predicted to be in a certain range of values,
none of which contain meta-chars.  The other pieces looks good.

-dave

/*==================
www.urth.org
We await the New Sun
==================*/

_______________________________________________
Mason-devel mailing list
Mason-devel@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/mason-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic