On Feb 16, 2006, at 11:53 AM, Ken Williams wrote:

On Feb 16, 2006, at 11:45 AM, Tyler MacDonald wrote:

        I think "passthrough" is the way to go here. I also still think that
if we default in some way to generating a Makefile.PL, create_makefile_pl
should be extended to have an explicit "skip" option as well.

Definitely. I'd just change the default to 'auto' (which means create a 'small' [or 'passthrough'] Makefile.PL if none already exists) though, and then the author can explicitly put "create_makefile_pl => 0" (or any other false value) in their Build.PL to shut it off.

If in the future we figure out how to auto-sense when we could create a 'traditional' Makefile.PL that would be cool, but I don't really see it happening. Too hard.

 -Ken

Attached below is a regexp-based solution that matches "simple" Build.PL files. I submit this just for thought, not necessarily for inclusion in M::B.

Inline below are the results of running my program against a bunch of CPAN packages. This demonstrates that many CPAN modules use "simple" Build.PL files. If (and that's a big if) we decided to use a code- matcher like what I've written, we could detect simple Build.PL files and decide on the fly if a "traditional" Makefile.PL is appropriate. Perhaps this mode could be triggered by C<create_makefile_pl => 'automatic'>

One could imagine that PPI would be a good tool to perform this code analysis.

% perl simple_build_pl ~/.cpanplus/5.8.6/build/*/Build.PL
simple  Array-Compare-1.13/Build.PL
simple  CAM-DBF-1.01/Build.PL
simple  CAM-EmailTemplate-SMTP-0.91/Build.PL
complex CAM-PDF-1.03/Build.PL
simple  CAM-SQLManager-1.13/Build.PL
simple  CAM-SQLObject-1.01/Build.PL
simple  CAM-Session-1.03/Build.PL
simple  CAM-Template-0.93/Build.PL
simple  CAM-Template-Cache-0.91/Build.PL
simple  CAM-XML-1.13/Build.PL
simple  CGI-Compress-Gzip-0.21/Build.PL
simple  Class-Accessor-Chained-0.01/Build.PL
simple  Class-Std-0.0.4/Build.PL
simple  Config-Std-0.0.2/Build.PL
complex DateTime-Locale-0.22/Build.PL
complex DateTime-TimeZone-0.40/Build.PL
simple  Devel-StackTrace-1.12/Build.PL
simple  Exception-Class-1.23/Build.PL
simple  ExtUtils-CBuilder-0.15/Build.PL
simple  FSA-Rules-0.23/Build.PL
complex File-Extract-0.06/Build.PL
simple  File-Find-Rule-0.28/Build.PL
simple  File-Find-Rule-Filesys-Virtual-1.21/Build.PL
simple  HTTP-Proxy-0.17/Build.PL
complex Image-Imlib2-1.07/Build.PL
complex Module-Build-0.27_06/Build.PL
simple  Module-CPANTS-Analyse-0.5/Build.PL
simple  Module-CPANTS-Generator-0.42/Build.PL
simple  Module-Depends-0.10/Build.PL
simple  Module-ExtractUse-0.17/Build.PL
simple  Module-Pluggable-2.96/Build.PL
simple  Module-Starter-PBP-0.0.2/Build.PL
simple  Net-DAV-Server-1.28/Build.PL
simple  Net-IP-Match-Regexp-0.93/Build.PL
simple  Net-VNC-0.30/Build.PL
simple  Parse-CPAN-Modlist-0.9/Build.PL
simple  Parse-CPAN-Packages-2.25/Build.PL
simple  Path-Class-0.15/Build.PL
complex PathTools-3.15/Build.PL
simple  Perl-Critic-0.13/Build.PL
simple  Perl-Metric-Basic-0.30/Build.PL
simple  Pod-Coverage-0.17/Build.PL
simple  Pod-FromActionscript-0.53/Build.PL
simple  Pod-Readme-0.05/Build.PL
simple  Pod-Strip-1.01/Build.PL
simple  SWF-NeedsRecompile-1.02/Build.PL
simple  Test-Distribution-1.23/Build.PL
simple  Test-Exception-0.21/Build.PL
simple  Test-MockObject-1.02/Build.PL
simple  Test-Perl-Critic-0.03/Build.PL
simple  UNIVERSAL-can-1.03/Build.PL
simple  UNIVERSAL-isa-0.05/Build.PL
complex version-0.53/Build.PL

Interestingly, two of the "complex" results were false positives because of typos in the Build.PL -- the file contained "author" instead of "dist_author"

Chris

--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703
vCard: http://www.chrisdolan.net/ChrisDolan.vcf

Clotho Advanced Media, Inc. - Creators of MediaLandscape Software (http://www.media-landscape.com/) and partners in the revolutionary Croquet project (http://www.opencroquet.org/)

Attachment: simple_build_pl
Description: Binary data


Reply via email to