As I said, Perl 5 in my opinion is impossible to be really parsed without run the code. This is way I still wait Perl 6, that is not so dependent of runtime states to define code.
Perl - like many other "dynamic languages" - is just too flexible to be statically analyzed with certainty. This is not a parsing problem. LISP (which famously has "no syntax" and is completely trivial to parse) has the same issues.
Consider this:
my $method = "method_name";
for my $class (qw(Class1 Class2 Class3)) {
my $object = $class->$method(shift (@arguments));
}
Now consider that all the string literals in this code are just strings, and can come from anywhere else, including files, databases, user input etc.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|