perlfilter 5.8.8
Sponsored Links
perlfilter 5.8.8 Ranking & Summary
File size:
12.2 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
880
Date added:
2007-05-29
Publisher:
Paul Marquess
perlfilter 5.8.8 description
perlfilter package contains Perl source filters.
This article is about a little-known feature of Perl called source filters. Source filters alter the program text of a module before Perl sees it, much as a C preprocessor alters the source text of a C program before the compiler sees it. This article tells you more about what source filters are, how they work, and how to write your own.
The original purpose of source filters was to let you encrypt your program source to prevent casual piracy. This isnt all they can do, as youll soon learn. But first, the basics.
CONCEPTS
Before the Perl interpreter can execute a Perl script, it must first read it from a file into memory for parsing and compilation. If that script itself includes other scripts with a use or 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 source stream. A source stream is created when the Perl parser opens a file, it continues to exist as the source code is read into memory, and it is destroyed when Perl is finished parsing the file. If the parser encounters a require or use statement in a source stream, a new and distinct stream is created just for that file.
The diagram below represents a single source stream, with the flow of source from a Perl script file on the left into the Perl parser on the right. This is how Perl normally operates.
file -------> parser
There are two important points to remember:
Although there can be any number of source streams in existence at any given time, only one will be active.
Every source stream is associated with only one file.
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 our diagram like this:
file ----> filter ----> parser
If that doesnt make much sense, consider the analogy of a command pipeline. Say you have a shell script stored in the compressed file trial.gz. The simple pipeline command below runs the script without needing to create a temporary file to hold the uncompressed file.
gunzip -c trial.gz | sh
In this case, the data flow from the pipeline can be represented as follows:
trial.gz ----> gunzip ----> sh
With source filters, you can store the text of your script compressed and use a source filter to uncompress it for Perls parser:
compressed gunzip
Perl program ---> source filter ---> parser
This article is about a little-known feature of Perl called source filters. Source filters alter the program text of a module before Perl sees it, much as a C preprocessor alters the source text of a C program before the compiler sees it. This article tells you more about what source filters are, how they work, and how to write your own.
The original purpose of source filters was to let you encrypt your program source to prevent casual piracy. This isnt all they can do, as youll soon learn. But first, the basics.
CONCEPTS
Before the Perl interpreter can execute a Perl script, it must first read it from a file into memory for parsing and compilation. If that script itself includes other scripts with a use or 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 source stream. A source stream is created when the Perl parser opens a file, it continues to exist as the source code is read into memory, and it is destroyed when Perl is finished parsing the file. If the parser encounters a require or use statement in a source stream, a new and distinct stream is created just for that file.
The diagram below represents a single source stream, with the flow of source from a Perl script file on the left into the Perl parser on the right. This is how Perl normally operates.
file -------> parser
There are two important points to remember:
Although there can be any number of source streams in existence at any given time, only one will be active.
Every source stream is associated with only one file.
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 our diagram like this:
file ----> filter ----> parser
If that doesnt make much sense, consider the analogy of a command pipeline. Say you have a shell script stored in the compressed file trial.gz. The simple pipeline command below runs the script without needing to create a temporary file to hold the uncompressed file.
gunzip -c trial.gz | sh
In this case, the data flow from the pipeline can be represented as follows:
trial.gz ----> gunzip ----> sh
With source filters, you can store the text of your script compressed and use a source filter to uncompress it for Perls parser:
compressed gunzip
Perl program ---> source filter ---> parser
perlfilter 5.8.8 Screenshot
perlfilter 5.8.8 Keywords
source filters
source filter
contains perl
source
Perl
file
perlfilter
filters
parser
perlfilter 5.8.8
Libraries
Programming
Bookmark perlfilter 5.8.8
perlfilter 5.8.8 Copyright
WareSeeker periodically updates pricing and software information of perlfilter 5.8.8 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of perlfilter 5.8.8 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
pure source filters
source plus filters
life source filters
frigidaire pure source filters
sun source filters
source water filters
air source filters
directshow source filters
filters fast
parser error message
source one
windows media player source filters
payless shoe source
k&n filters
xml parser
water source filters
source code
filters plus
Related Software
Perl is a high-level, general-purpose programming language. Free Download
perlfaq3 Perl module contains programming tools. Free Download
perl58delta Perl module contains information about what is new for perl v5.8.0. Free Download
ODBM_File is a Perl module to allow tied access to odbm files. Free Download
NDBM_File is a Perl module that allows tied access to ndbm files. Free Download
File::Glob is a Perl extension for BSD glob routine. Free Download
File::Find is a Perl module to traverse a directory tree. Free Download
PerlPrimer is a free, open-source GUI application written in Perl. Free Download
Latest Software
Popular Software
Favourite Software