This module is a L<ExtUtils::Builder::Planner::Extension|ExtUtils::Builder::Planner::Extension> that facilitates compiling object.
=head1 METHODS
=head2 add_methods(%options)
This adds two delegate methods to the planner, C<compile> and C<link>. It takes named arguments that will be prefixed to the named arguments for all delegate calls. In practice, it's mainly useful with the C<config>, C<profile> and C<type> arguments.
If your C<$planner> has a C<config> delegate, that will be used as default value for C<config>.
This is usually not called directly, but through L<ExtUtils::Builder::Planner|ExtUtils::Builder::Planner>'s C<load_extension> method.
=head2 link(\@sources, $target, %options)
=over 4
=item type
This works the same as with C<compile>.
=item config
This works the same as with C<compile>.
=item profile
This works the same as with C<compile>.
=item libraries
A list of libraries to link to. E.g. C<['z']>.
=item library_dirs
A list of directories to find libraries in. E.g. C<['/opt/my-app/lib/']>.
=item extra_args
A list of additional arguments to the linker.
=back
=head1 DELEGATES
=head2 compile($source, $target, %options)
This compiles C<$source> to C<$target>. It takes the following optional arguments:
=over 4
=item type
The type of the final product. This must be one of:
=over 4
=item * executable
An executable to be run. This is the default.
=item * static-library
A static library to link against.
=item * dynamic-library
A dynamic library to link against.
=item * loadable-object
A loadable extension. On most platforms this is the same as a dynamic library, but some (Mac) make a distinction between these two.
=back
=item config
A Perl configuration to take hints from, must be an C<ExtUtils::Config> compatible object.
=item profiles
A list of profile that can be used when compiling and linking. One profile comes with this distribution: C<'@Perl'>, which sets up the appropriate things to compile/link with C<libperl>.
=item include_dirs
A list of directories to add to the include path, e.g. C<['include', '.']>.
=item define
A hash of preprocessor defines, e.g. C<< {DEBUG => 1, HAVE_FEATURE => 0 } >>
=item extra_args
A list of additional arguments to the compiler.
=back
=head1 AUTHOR
Leon Timmermans <fawaka@gmail.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
Keyboard Shortcuts
Global
s
Focus search bar
?
Bring up this help dialog
GitHub
gp
Go to pull requests
gi
go to github issues (only if github is preferred repository)