1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
function - Allows macros to run Perl functions
This is a filepp module which allows macros to call Perl functions.
The module adds the keywords:
#function macro function
which tells filepp to call "function" when it finds "macro(args)" in a file
Wherever macro(args) is found in the file being processed, it will
call function(args) and replace macro(args) with the value returned by
function(args).
#rmfunction macro
which tells filepp to remove "macro" and its associated "function"
There is a simple test file included with this module. To test the
function module use the following command (the filed "test" and
"test.pm" are in this directory):
filepp -m function.pm -m test.pm test.in
For full documentation on how to use filepp and the function module read
the filepp man page.
Copyright (C) 2000-2003 Darren Miller
filepp is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Comments are welcome.
- Darren Miller <darren@cabaret.demon.co.uk>
|