The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

AutoCons::HOWTO::Perl - HOWTO write a Construct.PL for a Perl program

DESCRIPTION

AutoCons is a cons Construct generator similar to ExtUtils::MakeMaker or Gnu Autoconf, except that cons is far more portable than make. For the developer, this means that your program will build on any system that cons will. For a user, this means that you don't need a "make" program to build your program.

This HOWTO describes how to write Construct.PLs to build Perl programs.

Install

Modules are installed with a simple group of commands.

 perl Construct.PL
 cons
 cons t
 su -c "cons <prefix>"

Where <prefix> is where Perl is installed. Usually it's /usr on UNIX like systems and C:\Program Files on Windows ones.

Layout

The basic file layout looks like this. You might compare it to ExtUtils::MakeMaker's layout, but it is far more generic.

 ./Construct.PL # You know what that is.
 ./plib/* # Perl library modules. They will be checked for embedded POD.
 ./scripts/* # Any Perl scripts.
 ./t/* # Tests.

The only required file is Construct.PL, but it will just create a bare Construct, since it needs something to build.

Construct.PL

You should only have to write a basic Construct.PL, since AutoCons will auto-detect all of your module's requirements.

SEE ALSO

Other HOWTOs: AutoCons::HOWTO(1) AutoCons::HOWTO::C(1)

Other: AutoCons(3) cons(1) perl(1)