Blame README

Packit 745572
                              Source Filters
Packit 745572
 
Packit 745572
                               Version 1.58
Packit 745572
 
Packit 745572
                              2017-11-15 rurban
Packit 745572
 
Packit 745572
        Copyright (c) 1995-2011 Paul Marquess. All rights reserved.
Packit 745572
        Copyright (c) 2011-2014 Reini Urban. All rights reserved.
Packit 745572
        Copyright (c) 2014-2017 cPanel Inc. All rights reserved.
Packit 745572
        This program is free software; you can redistribute it and/or
Packit 745572
                 modify it under the same terms as Perl itself.
Packit 745572
 
Packit 745572
 
Packit 745572
 
Packit 745572
DESCRIPTION
Packit 745572
-----------
Packit 745572
 
Packit 745572
This distribution consists of a number of Source Filters.
Packit 745572
Packit 745572
For more details see the pod documentation embedded in the .pm files.
Packit 745572
Packit 745572
If you intend using the Filter::Util::Call functionality, I would strongly
Packit 745572
recommend that you check out Damian Conway's excellent Filter::Simple
Packit 745572
module. Damian's module provides a much cleaner interface than
Packit 745572
Filter::Util::Call. Although it doesn't allow the fine control that
Packit 745572
Filter::Util::Call does, it should be adequate for the majority of
Packit 745572
applications. It's available at
Packit 745572
Packit 745572
   http://search.cpan.org/dist/Filter-Simple/
Packit 745572
Packit 745572
LIMITATIONS
Packit 745572
-----------
Packit 745572
Packit 745572
Source filters only work on the string level, thus are highly limited
Packit 745572
in its ability to change source code on the fly. It cannot detect
Packit 745572
comments, quoted strings, heredocs, it is no replacement for a real
Packit 745572
parser.
Packit 745572
The only stable usage for source filters are encryption, compression,
Packit 745572
or the byteloader, to translate binary code back to source code.
Packit 745572
Packit 745572
See for example the limitations in Switch, which uses source filters,
Packit 745572
and thus is does not work inside a string eval, the presence of
Packit 745572
regexes with embedded newlines that are specified with raw /.../
Packit 745572
delimiters and don't have a modifier //x are indistinguishable from
Packit 745572
code chunks beginning with the division operator /. As a workaround
Packit 745572
you must use m/.../ or m?...? for such patterns. Also, the presence of
Packit 745572
regexes specified with raw ?...? delimiters may cause mysterious
Packit 745572
errors. The workaround is to use m?...? instead.  See
Packit 745572
http://search.cpan.org/perldoc?Switch#LIMITATIONS
Packit 745572
Packit 745572
Currently internal buffer lengths are limited to 32-bit only.
Packit 745572
Packit 745572
Packit 745572
PREREQUISITES
Packit 745572
-------------
Packit 745572
 
Packit 745572
Before you can build the Source Filters you need to have the following
Packit 745572
installed on your system:
Packit 745572
Packit 745572
    * Perl 5.6.0 or better
Packit 745572
Packit 745572
For older Perls use older versions of Filter.
Packit 745572
Packit 745572
BUILDING THE MODULES
Packit 745572
--------------------
Packit 745572
 
Packit 745572
Assuming you have met all the prerequisites, building the modules
Packit 745572
should be relatively straightforward.
Packit 745572
Packit 745572
The modules can now be built using this sequence of commands:
Packit 745572
 
Packit 745572
    perl Makefile.PL
Packit 745572
    make
Packit 745572
    make test
Packit 745572
Packit 745572
The filters have been successfully built and tested on the following
Packit 745572
systems (at least):
Packit 745572
Packit 745572
	linux (gcc or clang)
Packit 745572
	cygwin 1.7
Packit 745572
	mingw strawberry 5.14
Packit 745572
	SunOS 4.1.3 (Sun C compiler & gcc 2.7.2.3)
Packit 745572
	Solaris 2.3 (Sun C Compiler)
Packit 745572
	irix 5.3	
Packit 745572
	irix 6.x	
Packit 745572
	Windows XP (Visual C++ 6.0)
Packit 745572
Packit 745572
On Windows tr.exe and cpp.exe should be really the gnu/mingw tools in the path
Packit 745572
for the testsuite to pass successfully.
Packit 745572
Packit 745572
INSTALLATION
Packit 745572
------------
Packit 745572
 
Packit 745572
    make install