[ABE.pm] A little programming help
Ricardo SIGNES
rjbs-perl-abe at lists.manxome.org
Wed Sep 5 09:23:05 PDT 2007
* "Faber J. Fedor" <faber at linuxnj.com> [2007-09-05T11:01:39]
> Here are two attemtps to do the same thing, but I'm stuck on both.
>
> Objective: parse the string
>
> q( my @prereqs = ("forddaily", "processdailydata"); )
Isn't there some way you can NOT have to parse Perl code?
Do you always trust that the incoming string is NOT malicious?
I would NOT screw around here. Do one of two things:
(a) if you trust the code, use eval $string and Data::Dumper
(b) if you do not, use PPI
Alternately, define a very specific grammar that the code must match. Then a
regex will be easy.
--
rjbs
More information about the ABE-pm
mailing list