Rodney_Hampton has asked for the wisdom of the Perl Monks concerning the following question:
========================
##BEGIN preparse #makes use of experimental code evaluation regexp features in +perl my @link_names; $$file =~ s/<%[ ]*link_name[ ]*([^ ]*)[ ]*%>(?{push(@link_name +s,$1);})/<% link_name $1%>/g; #printStruct(\@link_names); #debugging #now map link names to actual variables my $sql; foreach my $link_name (@link_names){ $link_name=$dbh->quote($link_name); $sql="SELECT template_id FROM template_table where template_ +name=$link_name"; #print "SQL is $sql \n"; #if success do another regexp find and replace with real url + #otherwise replace template tag with HTML code comment indic +ating error }#end foreach ##END preparse
This works fine. The @link_names array is populated
correctly. My only concern is that code evaluation is
indicated in the docs as a very experimental thing.
Will this be deprecated in the future or should I not worry about it?
Rodney A. Hampton
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is it safe to use code evaluation regexp or will it be deprecated
by broquaint (Abbot) on Oct 22, 2002 at 16:20 UTC | |
|
Re: Is it safe to use code evaluation regexp or will it be deprecated
by fruiture (Curate) on Oct 22, 2002 at 16:40 UTC |