NAME
Module::Build::PM_Filter - Add a PM_Filter feature to Module::Build
SYNOPSIS
In a Build.PL file you must use this module in place of the Module::Build:
use Module::Build::PM_Filter;
my $build = Module::Build::PM_Filter->new(
module_name => 'MyIkiWiki::Tools',
license => q(gpl),
dist_version => '0.2',
dist_author => 'Víctor Moral <victor@taquiones.net>',
);
$build->create_build_script();
In the package directory build a pm_filter file like this:
#!/usr/bin/perl -pl
s{##PACKAGE_LIB##}{use lib qw(/usr/share/myprogram);}g;
and change its permissions for user execution.
Then in a script from package insert a line like this:
package MyPackage;
use strict;
use base;
...
##PACKAGE_LIB##
...
DESCRIPTION
This module provides a Module::Build compatible class and adds a filter for pm files. The filter could be used to replace Perl source from development environment to production.
In the debug phase we can play with the application and modules without mattering to us where the library are; when we build the package for distribution, the modules and the scripts will contain the correct path in the final location.
SUBRUTINES/METHODS
process_pm_files( )
This method looks for a file named 'pm_filter' in the current work directory and executes it; his standard input is redirected to the source pm and his standard output is redirected to a temp file.
The temp file is finally installed on the blib/ tree.
process_script_files( )
This method finds, filters and install the executable files in the package.
DIAGNOSTICS
DEPENDENCIES
BUGS AND LIMITATIONS
There are no known bugs in this module. Please report problems to the author. Patches are welcome.
AUTHOR
Víctor Moral <victor@taquiones.net>
LICENCE AND COPYRIGHT
Copyright (c) 2005 "Víctor Moral" <victor@taquiones.net>
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 95:
Non-ASCII character seen before =encoding in ''Víctor'. Assuming CP1252