Alien-Tidyp
view release on metacpan or search on metacpan
lib/Alien/Tidyp.pm view on Meta::CPAN
=over
=item * Locate an already installed I<tidyp> + ask user whether to use the already installed
I<tidyp> or whether to build I<tidyp> from sources
=item * Via env variable TIDYP_DIR you can specify where the build script should look
for the already installed I<tidyp> (directories $TIDYP_DIR/lib and $TIDYP_DIR/include/tidyp
are expected to exist)
=item * When not using the already installed I<tidyp> build process continues with
the following steps
=item * Download I<tidyp> source code tarball
=item * Build I<tidyp> binaries from source codes (note: static libraries are build in this case)
=item * Install binaries and dev files (*.h, *.a) into I<share> directory of Alien::Tidyp
distribution - I<share> directory is usually something like this: /usr/lib/perl5/site_perl/5.10/auto/share/dist/Alien-Tidyp
=back
Later on you can use Alien::Tidyp in your module that needs to link with
I<tidyp> like this:
# Sample Makefile.pl
use ExtUtils::MakeMaker;
use Alien::Tidyp;
WriteMakefile(
NAME => 'Any::Tidyp::Module',
VERSION_FROM => 'lib/Any/Tidyp/Module.pm',
LIBS => Alien::Tidyp->config('LIBS'),
INC => Alien::Tidyp->config('INC'),
# + additional params
);
B<IMPORTANT:> As Alien::Tidyp builds static libraries the modules using Alien::Tidyp (e.g. L<HTML::Tidy|HTML::Tidy>)
need to have Alien::Tidyp just for building, not for later use. In other words Alien:Tidyp is just "build dependency"
not "run-time dependency".
=head1 Build.PL options
=head2 --srctarball=<url_or_filename>
This option might come handy if you are not connected to the Internet. You can use it like:
Build.PL --srctarball=/path/to/file/tidyp-1.04.tar.gz
or:
Build.PL --srctarball=http://any.server.com/path/to/tidyp-1.04.tar.gz
IMPORTANT: The file should always be exactly the same source code tarball as specified in the end of Build.PL - see
source code (SHA1 checksum of the tarball is checked).
=head1 METHODS
=head2 config()
This function is the main public interface to this module.
Alien::Tidyp->config('LIBS');
Returns a string like: '-L/path/to/tidyp/dir/lib -ltidyp'
Alien::Tidyp->config('INC');
Returns a string like: '-I/path/to/tidyp/dir/include/tidyp'
Alien::Tidyp->config('PREFIX');
Returns a string like: '/path/to/tidyp/dir' (note: if using the already installed
tidyp config('PREFIX') returns undef)
=head1 AUTHOR
KMX, E<lt>kmx at cpan.orgE<gt>
=head1 BUGS
Please report any bugs or feature requests to E<lt>bug-Alien-Tidyp at rt.cpan.orgE<gt>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Alien-Tidyp>.
=head1 LICENSE AND COPYRIGHT
Please notice that the source code of tidyp library has a different license than module itself.
=head2 Alien::Tidyp perl module
Copyright (c) 2010 KMX.
This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
=head2 Source code of tidyp library
Copyright (c) 1998-2003 World Wide Web Consortium
(Massachusetts Institute of Technology, European Research
Consortium for Informatics and Mathematics, Keio University).
All Rights Reserved.
This software and documentation is provided "as is," and
the copyright holders and contributing author(s) make no
representations or warranties, express or implied, including
but not limited to, warranties of merchantability or fitness
for any particular purpose or that the use of the software or
documentation will not infringe any third party patents,
copyrights, trademarks or other rights.
The copyright holders and contributing author(s) will not be held
liable for any direct, indirect, special or consequential damages
arising out of any use of the software or documentation, even if
advised of the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute
this source code, or portions hereof, documentation and executables,
for any purpose, without fee, subject to the following restrictions:
( run in 1.064 second using v1.01-cache-2.11-cpan-df04353d9ac )