hi
while reading use and require modules, i confused with perl is compiled or
interpreted..
i read FAQ. but i cudnt understand the following paragraph.. In the
following paragraph what is meant by parse tree and What do they mean by
front end and backend..Can anyone explain this in detail???

Thanks in advance

Regards,

Babylakshmi



The perl executable you are using has two distinct stages. First comes the
frontend, which is certainly a compiler of sorts. It compiles your perl
program source into a parse tree. This compiler then performs various
optimizations such as one would find in any other compiler, including
throwing out unreachable code, reducing constant expressions to their
results, and loading in certain library definitions. It is at this point
that the use statements get run, since they are semantically equivalent to
BEGIN{} blocks wrapping a require and an import() class-method call against
the included module.

End of compilation.
Next comes the backend, which is certainly an interpreter of sorts; let's
call it a PP interpreter for now, just because. While what it actually
executes is a parse tree and not byte code per se, still we would not go
wrong in classifying this backend as a byte-code interpreter (like java or
python). This is useful in particular when it comes to distinguishing these
languages from ``pure'' interpreters, such as most shell and tcl
implementations you happen to run. This is where any requires not wrapped in
BEGINs occur.

http://www.perl.com/CPAN-local/doc/FMTEYEWTK/comp-vs-interp.html



_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Reply via email to