=head1 NAME
perlfilter - Source Filters
-
=head1 DESCRIPTION
=head1 CONCEPTS
Before the Perl interpreter can execute a Perl script, it must first
-read it from a file into memory for parsing and compilation. (Even
-scripts specified on the command line with the C<-e> option are stored in
-a temporary file for the parser to process.) If that script itself
-includes other scripts with a C<use> or C<require> statement, then each
-of those scripts will have to be read from their respective files as
-well.
+read it from a file into memory for parsing and compilation. If that
+script itself includes other scripts with a C<use> or C<require>
+statement, then each of those scripts will have to be read from their
+respective files as well.
Now think of each logical connection between the Perl parser and an
individual file as a I<source stream>. A source stream is created when
A source filter is a special kind of Perl module that intercepts and
modifies a source stream before it reaches the parser. A source filter
-changes the our diagram like this:
+changes our diagram like this:
file ----> filter ----> parser
C<decrypt> filter (which unscrambles the source before Perl parses it)
included with the source filter distribution is an example of a C
source filter (see Decryption Filters, below).
-
+
=over 5
package Debug;
use strict;
+ use warnings;
use Filter::Util::Call ;
use constant TRUE => 1 ;
EOM
Such things aside, you can see that a lot can be achieved with a modest
-amount of code. I<[Note that Tuomas' toy VRML parser on p. 17 had the
-same difficulty parsing VRML strings that look like comments. -Jon]>
+amount of code.
=head1 CONCLUSION