vpp - versatile text pre-processor
vpp -var toto=1 file_in > file_out #same result vpp -var toto=1 -output file_out file_in
vpp enables you to pre-process a file.
Note that vpp is not designed to replace the well known cpp.
See "INPUT FILE SYNTAX" in Text::Vpp.
Specify variables that are used in the input file. The argument of the option must be written like var_name=var_value Don't forget to escape shell sensitive characters.
Specify a file (name FileName) which holds an 'external' representation of a hash as it is created by Perl's Data::Dumper module. Example: $People = { 'person' => { 'nick' => 'Larry', 'name' => 'Larry Wall', 'address' => { 'street' => 'nirwana', 'city' => 'Perl.Org', 'zip' => '007' } }, 'pumpkin' => { 'nick' => 'Guru', 'name' => 'Sarathy Gurusamy', 'address' => { 'state' => 'Madison', 'zip' => '008' } } };
Enables the user to use different char as action char. (default @) Don't forget to escape shell sensitive characters.
Example: -action '#' will enable vpp to understand #include, #ifdef ..
Enables the user to use different char as comment char. (default #) Don't forget to escape shell sensitive characters.
no comments are possible.
Enables the user to use different char(s) as prefix char(s), i.e. variables in your text (only) are prefixed by that character(s) instead of the default '$'. If no suffix character(s) has been defined (or set to 'undef') variables may be specified in the form ${variable} where '$' is the current prefix char(s). This form is necessary, if any character which is allowed within a name (regexp '\w') immediately follows the variable. Note, that all variables in 'actions' (like @@ @EVAL @FOREACH @IF) must still be prefixed by '$'. Don't forget to escape shell sensitive characters.
Enables the user to use different char(s) as suffix char(s), i.e. variables in your text (only) are suffixed by that character(s). Note, that all variables in 'actions' (like @@ @EVAL @FOREACH @IF) don't use this. Don't forget to escape shell sensitive characters.
Enables the user to specify the prefix and suffix used to mark a Perl expression within the text that will be replaced by its value. The default value is twice the 'action' char as suffix and prefix. Instead of '/' any other non space character can be used. Don't forget to escape shell sensitive characters.
By default, line ending with '\' are glued to the following line (like in ksh). Once this method is called '\' will be left as is.
Specify the output file name, defaults to STDOUT You may prefix the filename with >> to get the output appended to an existing file.
Dominique Dumont Dominique_Dumont@grenoble.hp.com
Copyright (c) 1996-2001 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl, Text::Vpp
To install Text::Vpp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Vpp
CPAN shell
perl -MCPAN -e shell install Text::Vpp
For more information on module installation, please visit the detailed CPAN module installation guide.