The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

02-build_distros_with_xs.pl

SYNOPSIS

  perl 02-build_distros_with_xs.pl

  # Only visit portion of derived list starting with 'X'
  perl 02-build_distros_with_xs.pl X  

DESCRIPTION

This is an example of a program which uses CPAN::Mini::Visit::Simple. In companion program 01-distros_with_xs.pl, we used the say_list() method to store in a file a list of all CPAN distributions with XS code. Here we further modify that list and then use it as a derived list which is input to the identify_distros_from_derived_list() method. We then use the visit() method to perform an action upon each visit, viz., we attempt to build each distribution with make or ./Build.PL. We log successful and failed builds to separate files. Files listed as successful builds are then available as the source of other derived lists in other programs in later steps in our development process.

Limitation

In its current form, this program is not able to easily handle distributions whose Makefile.PL pauses to prompt the user to supply information STDIN. Since the larger project of which this program is a part merely aims to get a useful subset of CPAN as a sample used during testing, we only want to concern ourselves with distributions whose perl Makefile.PL and make calls will run in a completely automated way -- regardless of whether they ultimately succeed or not.

So, in practice, this program had to be run repeatedly. Each time a distribution with a user-prompt was encountered, that distribution's name was added to a list of distributions to be skipped over (see the __DATA__ section of this program) and the program was rerun. This led to the program being designed to be run one letter of the alphabet at a time.

Do you have a better way to approach this problem? Please contact the author.