Alien-ROOT
view release on metacpan or search on metacpan
inc/inc_Module-Build/Module/Build/API.pod view on Meta::CPAN
want to set the relative install path for custom build elements.
With no argument, it returns a reference to a hash containing all
elements and their respective values. This hash should not be modified
directly; use the multiple argument below form to change values.
The single argument form returns the value associated with the
element C<$type>.
The multiple argument form allows you to set the paths for element types.
C<$value> must be a relative path using Unix-like paths. (A series of
directories separated by slashes, e.g. C<foo/bar>.) The return value is a
localized path based on C<$value>.
Assigning the value C<undef> to an element causes it to be removed.
=item install_destination($type)
[version 0.28]
Returns the directory in which items of type C<$type> (e.g. C<lib>,
C<arch>, C<bin>, or anything else returned by the L</install_types()>
method) will be installed during the C<install> action. Any settings
for C<install_path>, C<install_base>, and C<prefix> are taken into
account when determining the return value.
=item install_path()
=item install_path($type)
=item install_path($type => $path)
[version 0.28]
Set or retrieve paths for specific installable elements. This is
useful when you want to examine any explicit install paths specified
by the user on the command line, or if you want to set the install
path for a specific installable element based on another attribute
like C<install_base()>.
With no argument, it returns a reference to a hash containing all
elements and their respective values. This hash should not be modified
directly; use the multiple argument below form to change values.
The single argument form returns the value associated with the
element C<$type>.
The multiple argument form allows you to set the paths for element types.
The supplied C<$path> should be an absolute path to install elements
of C<$type>. The return value is C<$path>.
Assigning the value C<undef> to an element causes it to be removed.
=item install_types()
[version 0.28]
Returns a list of installable types that this build knows about.
These types each correspond to the name of a directory in F<blib/>,
and the list usually includes items such as C<lib>, C<arch>, C<bin>,
C<script>, C<libdoc>, C<bindoc>, and if HTML documentation is to be
built, C<libhtml> and C<binhtml>. Other user-defined types may also
exist.
=item invoked_action()
[version 0.28]
This is the name of the original action invoked by the user. This
value is set when the user invokes F<Build.PL>, the F<Build> script,
or programmatically through the L<dispatch()|/"dispatch($action, %args)">
method. It does not change as sub-actions are executed as
dependencies are evaluated.
To get the name of the currently executing dependency, see
L</current_action()> above.
=item notes()
=item notes($key)
=item notes($key => $value)
[version 0.20]
The C<notes()> value allows you to store your own persistent
information about the build, and to share that information among
different entities involved in the build. See the example in the
C<current()> method.
The C<notes()> method is essentially a glorified hash access. With no
arguments, C<notes()> returns the entire hash of notes. With one argument,
C<notes($key)> returns the value associated with the given key. With two
arguments, C<notes($key, $value)> sets the value associated with the given key
to C<$value> and returns the new value.
The lifetime of the C<notes> data is for "a build" - that is, the
C<notes> hash is created when C<perl Build.PL> is run (or when the
C<new()> method is run, if the Module::Build Perl API is being used
instead of called from a shell), and lasts until C<perl Build.PL> is
run again or the C<clean> action is run.
=item orig_dir()
[version 0.28]
Returns a string containing the working directory that was in effect
before the F<Build> script chdir()-ed into the C<base_dir>. This
might be useful for writing wrapper tools that might need to chdir()
back out.
=item os_type()
[version 0.04]
If you're subclassing Module::Build and some code needs to alter its
behavior based on the current platform, you may only need to know
whether you're running on Windows, Unix, MacOS, VMS, etc., and not the
fine-grained value of Perl's C<$^O> variable. The C<os_type()> method
will return a string like C<Windows>, C<Unix>, C<MacOS>, C<VMS>, or
whatever is appropriate. If you're running on an unknown platform, it
inc/inc_Module-Build/Module/Build/API.pod view on Meta::CPAN
dynamically.
For backward compatibility, the C<scripts()> method does exactly the
same thing as C<script_files()>. C<scripts()> is deprecated, but it
will stay around for several versions to give people time to
transition.
=item up_to_date($source_file, $derived_file)
=item up_to_date(\@source_files, \@derived_files)
[version 0.20]
This method can be used to compare a set of source files to a set of
derived files. If any of the source files are newer than any of the
derived files, it returns false. Additionally, if any of the derived
files do not exist, it returns false. Otherwise it returns true.
The arguments may be either a scalar or an array reference of file
names.
=item y_n($message, $default)
[version 0.12]
Asks the user a yes/no question using C<prompt()> and returns true or
false accordingly. The user will be asked the question repeatedly
until they give an answer that looks like "yes" or "no".
The first argument specifies the message to display to the user (for
example, C<"Shall I invest your money for you?">), and the second
argument specifies the default answer (for example, C<"y">).
Note that the default is specified as a string like C<"y"> or C<"n">,
and the return value is a Perl boolean value like 1 or 0. I thought
about this for a while and this seemed like the most useful way to do
it.
This method may be called as a class or object method.
=back
=head2 Autogenerated Accessors
In addition to the aforementioned methods, there are also some get/set
accessor methods for the following properties:
=over 4
=item PL_files()
=item allow_mb_mismatch()
=item auto_configure_requires()
=item autosplit()
=item base_dir()
=item bindoc_dirs()
=item blib()
=item build_bat()
=item build_class()
=item build_elements()
=item build_requires()
=item build_script()
=item bundle_inc()
=item bundle_inc_preload()
=item c_source()
=item config_dir()
=item configure_requires()
=item conflicts()
=item cpan_client()
=item create_license()
=item create_makefile_pl()
=item create_packlist()
=item create_readme()
=item debug()
=item debugger()
=item destdir()
=item dynamic_config()
=item get_options()
=item html_css()
=item include_dirs()
=item install_base()
=item installdirs()
=item libdoc_dirs()
=item license()
=item magic_number()
=item mb_version()
( run in 0.327 second using v1.01-cache-2.11-cpan-524268b4103 )