
Distribution::Guess::BuildSystem - This is the description

use Distribution::Guess::BuildSystem;
chdir $dist_dir;
my $guesser = Distribution::Guess::BuildSystem->new(
dist_dir => $dir
);
my $build_files = $guesser->build_files; # Hash ref
my $build_pl = $guesser->has_build_pl;
my $makefile_pl = $guesser->has_makefile_pl;
my $both = $guesser->has_build_and_makefile;
my $build_command = $guesser->build_commands; # Hash ref
if( $guesser->uses_module_install )
{
my $version = $guesser->module_install_version;
my $pita = $guesser->uses_auto_install;
}
if( $guesser->uses_makemaker )
{
my $version = $guesser->makemaker_version;
my $make = $guesser->make_command;
}

There are three major build system for Perl distributions:
Uses Makefile.PL and make.
Uses Build.PL and perl, although it might have a Makefile.PL that is a wrapper.
Uses Makefile.PL and calls to an embedded Module::Install. It might use auto_install to call CPAN.pm at build time.
The trick is to figure out which one you are supposed to use.
Returns an hash reference of build files found in the distribution. The keys are the filenames of the build files. The values
Returns the build file that you should use, even if there is more than one. Right now this is simple. If Build.PL is there, use it before Makefile.PL.
Returns the build command that you should use, even if there is more than one. Right now this is simple. If Build.PL is there, return perl. If not and Makefile.PL is there, return make.
Returns an anonymous hash to the paths to the build files, based on the dist_dir argument to new and the return value of build_files. The keys are the file names and the values are the paths.
Has the file name returned by build_pl.
Has the file name returned by makefile_pl.
Has both the files returned by makefile_pl and build_pl.
Looks in %Config to see what perl discovered when someone built it if you can use a make variant to build the distribution.
Returns the perl currently running if you can use perl to build the distribution.
Returns a hash reference of the commands you can use to build the distribution. The keys are the commands, such as make or perl Build.PL.
The distro uses ExtUtils::Makemaker.
Returns the version of Makemaker installed for the perl running this code.
Returns true if this distribution uses Module::Build.
Returns the version of Module::Build install for perl running this code.
Returns true if this distribution uses Module::Install.
Returns true if this distribution uses Module::Install and will use the auto_install feature.
This is a very simple test right now. If it finds the string auto_install in the build file, it returns true.
Returns the version of Module::Install.
Returns true if this distribution uses Module::Install::Compat and will use the create_makefile_pl feature.
This is a very simple test right now. If it finds the string create_makefile_pl in the build file, it returns true.
Returns true if Build.PL is a wrapper around Makefile.PL.
You may want to override or extend these, so they are methods.
Returns the string used for the Makefile.PL filename. Seems stupid until you want to change it in a subclass, which you can do now that it's a method. :)
Returns the string used for the Build.PL filename. Seems stupid until you want to change it in a subclass, which you can do now that it's a method. :)
Returns the module name of Makemaker, which is ExtUtils::MakeMaker.
Return the string representing the name for Module::Build.
Return the string representing the name for Module::Install. By default this is inc::Module::Install.
Returns the directory that contains Module::Install. This is the distribution directory because the module name is actually inc::Module::Install.
The name of the module that can get a list of used modules from a Perl file. By default this is Module::Extract::Use.



This source is in Github:
git://github.com/briandfoy/distribution-guess-buildsystem.git

brian d foy, <bdfoy@cpan.org>

Copyright (c) 2008, brian d foy, All Rights Reserved.
You may redistribute this under the same terms as Perl itself.