lib/ExtUtils/Liblist.pm Locates libraries
lib/ExtUtils/Liblist/Kid.pm Does the real work of the above
lib/ExtUtils/MakeMaker.pm Write Makefiles for extensions
+lib/ExtUtils/MakeMaker/bytes.pm Version agnostic bytes.pm
lib/ExtUtils/MakeMaker/FAQ.pod MakeMaker FAQ
lib/ExtUtils/MakeMaker/Tutorial.pod Writing a module with MakeMaker
lib/ExtUtils/MakeMaker/vmsish.pm Platform agnostic vmsish.pm
lib/ExtUtils/Manifest.pm Utilities to write MANIFEST files
lib/ExtUtils/MANIFEST.SKIP The default MANIFEST.SKIP
+lib/ExtUtils/META.yml ExtUtils::MakeMaker metadata
lib/ExtUtils/Mkbootstrap.pm Writes a bootstrap file (see MakeMaker)
lib/ExtUtils/Mksymlists.pm Writes a linker options file for extensions
lib/ExtUtils/MM.pm MakeMaker adaptor class
lib/ExtUtils/t/00setup_dummy.t Setup MakeMaker test module
lib/ExtUtils/t/backwards.t Check MakeMaker's backwards compatibility
lib/ExtUtils/t/basic.t See if MakeMaker can build a module
+lib/ExtUtils/t/bytes.t Test ExtUtils::MakeMaker::bytes
lib/ExtUtils/t/Command.t See if ExtUtils::Command works (Win32 only)
lib/ExtUtils/t/Constant.t See if ExtUtils::Constant works
lib/ExtUtils/t/Embed.t See if ExtUtils::Embed and embedding works
lib/ExtUtils/t/split_command.t See if MM's xargs-like function works
lib/ExtUtils/t/testlib.t See if ExtUtils::testlib works
lib/ExtUtils/t/VERSION_FROM.t See if MakeMaker's VERSION_FROM works
+lib/ExtUtils/t/vmsish.t Test ExtUtils::MakeMaker::vmsish
lib/ExtUtils/t/writemakefile_args.t See if WriteMakefile works
lib/ExtUtils/t/zz_cleanup_dummy.t Cleanup MakeMaker test module
lib/ExtUtils/testlib.pm Fixes up @INC to use just-built extension
-6.06_05
+6.10_04 Fri May 23 01:13:04 PDT 2003
+ - Working around BSD threaading bug in version check. [from bleadperl]
+ - Added the Makefile to the dist dependencies. (Slaven Rezic)
+ - Reversing the find_perl() version check failure warning introced in
+ 6.10_03. Too talkative, warned when nothing was wrong.
+ * Fixing META.yml auto-addition when there's no newline at the end
+ of the MANIFEST [rt.cpan.org 2444]
+ * Making it a bit more obvious in the MANIFEST where META.yml comes from.
+ - Fixed $_ clobbering in ExtUtils::Manifest functions.
+ - [rt.cpan.org 2591] some LD_RUN_PATH thing (Marek Rouchal)
+ - Added core.\d+ files to 'make clean' [rt.cpan.org 2543] (Slaven Rezic)
+ - INST_* targets were expanded too early (Stas Bekman)
+ - Adding ExtUtils::MakeMaker::bytes (bytes.pm backwards compat wrapper)
+ - Fixing MM_MacOS so it will compile on 5.5.x machines (use bytes wrapper)
+ * Reducing perldepend set of CORE/*.h dependencies to what 5.5.3 has.
+ 5.5.3 should be able to compile XS again.
+ * Eliminating fakethr.h and perlsfio.h from VMS's perldepend as they
+ sometimes don't get installed.
+ - ExtUtils::Install was making a few directories even with the
+ "don't really do it" switch on (Slaven Rezic)
+ * can build static linked perl binaries again. Probably damaged in
+ 6.06_01 when $self->{MAKEFILE} became FIRST_MAKEFILE. (Nick Clark)
+
+6.10_03 Fri Apr 11 00:21:25 PDT 2003
+ * Added NO_META WriteMakefile() option to suppress generation of
+ META.yml. (Spoon, rt.cpan.org 2359)
+ - Spurious linebreak in uninstall_from_sitedirs on VMS (Craig Berry)
+ * A bit after 6.05 man page names would come out as lib::Foo::Bar
+ if the module name didn't contain a ::. Found with podulators.
+ Fixed.
+ * Skipping installation of RCS ,v files.
+ * 'make ci' was busted between 6.05 and 6.06_01. Fixed. (Andreas)
+ - 'make test' was broken when there's no tests. Introduced in 6.06_03.
+ (Stas Bekman)
+ - Solving some directory depth problems in tests on oldish VMS systems.
+ (Craig Berry)
+ - Fixing MM_MacOS so it compiles on UTF-8 systems. (Jarkko)
+ - Making find_perl() more talkative when the version check fails
+ miserably.
+ - Fixing PERL_ARCHIVE on VMS so XS can compile again (Craig Berry)
+
+6.10_02 Mon Apr 7 00:57:15 PDT 2003
+ * Removed 2>&1 experiment introduced in 6.10_01 for all non-Unixen
+ except for OS/2. Thought Perl might emulate `... 2>&1`. It doesn't.
+ Just on OS/2.
+
+6.10_01 Sun Apr 6 19:31:42 PDT 2003
+ - Making install "Skip ... (unchanged)" message happen consistently
+ - Checking file sizes as well as modification times when deciding
+ to skip installing a file.
+ - OS/2 was using $(RM) instead of $(RM_F) (Ilya)
+ - OS/2 needs .dll removed on failed build (Ilya)
+ - fixin() was assuming that rename() can overwrite the target (Ilya)
+ - manifypods target was empty if there are no pods to manify. Put in
+ at least $(NOECHO) $(NOOP)
+ - Cygwin test to check for finding pod2man when building the perl core
+ removed. No longer relevent.
+ - Small fixes for dmake (Mattia Barbon)
+ * Added "Reporting bugs" section to the PATCHING doc.
+ - Minor bug in compile test missed ExtUtils::Liblist::Kid
+ - Removing $(VERSION_FROM) from Makefile dependency. It was too
+ annoying to rebuild the Makefile every time the module changed.
+ Mentioned it in the FAQ instead.
+ - Fixing PERL_ARCHIVE macro on VMS. Apparently it never appeared
+ properly before. (Craig Berry)
+ - Fixing ECHO on dmake.
+ - Adding os_flavor() and os_flavor_is()
+ - Making basic.t error output combine STDOUT & STDERR for easier
+ reading.
+ * ExtUtils::Manifest will now work case insensitively.
+ - Fixed 'subroutine redefined' warnings in 00compile.t
+ - Fixed it so typemaps are only looked for in the perl core library.
+ * Hacking around VMS filesystem problems reconstructing package names
+ from filenames in ExtUtils::Installed. (Jesper Naur)
+
+# There was no 6.06, I jumped straight to 6.10_XX because there's been
+# so much change between 6.05 and now.
+
+6.06_05 Mon Mar 31 02:44:11 PST 2003
- Syncing into bleadperl. Minor nits revealed...
- AutoSplit open filehandle bug was fixed in bleadperl. Averted a
warning because of this.
for (readdir DIR) {
next if $_ eq $Curdir || $_ eq $Updir || $_ eq ".exists";
my $targetdir = install_rooted_dir($from_to{$source_dir_or_file});
- if ($nonono) {
- if (!-w $targetdir) {
- print "mkpath($targetdir)\n" if $verbose>1;
- }
- last;
- } else {
- if (-w $targetdir ||
- mkpath($targetdir)) {
- last;
- } else {
- warn "Warning: You do not have permissions to " .
- "install into $from_to{$source_dir_or_file}"
- unless $warn_permissions++;
- }
+ mkpath($targetdir) unless $nonono;
+ if (!$nonono && !-w $targetdir) {
+ warn "Warning: You do not have permissions to " .
+ "install into $from_to{$source_dir_or_file}"
+ unless $warn_permissions++;
}
}
closedir DIR;
next;
}
warn "'-l$thislib' found at $fullname\n" if $verbose;
- my($fullnamedir) = dirname($fullname);
- push @ld_run_path, $fullnamedir
- unless $ld_run_path_seen{$fullnamedir}++;
push @libs, $fullname unless $libs_seen{$fullname}++;
$found++;
$found_lib++;
my $is_dyna = ($fullname !~ /\Q$Config_libext\E\z/);
my $in_perl = ($libs =~ /\B-l\Q${thislib}\E\b/s);
+ # include the path to the lib once in the dynamic linker path
+ # but only if it is a dynamic lib and not in Perl itself
+ my($fullnamedir) = dirname($fullname);
+ push @ld_run_path, $fullnamedir
+ if $is_dyna && !$in_perl &&
+ !$ld_run_path_seen{$fullnamedir}++;
+
# Do not add it into the list if it is already linked in
# with the main perl executable.
# We have to special-case the NeXT, because math and ndbm
--- /dev/null
+#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
+name: ExtUtils-MakeMaker
+version: 6.10_04
+version_from: lib/ExtUtils/MakeMaker.pm
+installdirs: perl
+requires:
+ File::Basename: 0
+ File::Spec: 0.8
+ DirHandle: 0
+ Pod::Man: 0
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.10_04
MAKE_FRAG
my $add_meta = $self->oneliner(<<'CODE', ['-MExtUtils::Manifest=maniadd']);
-maniadd({q{META.yml} => q{Module meta-data in YAML}});
+maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}});
CODE
return sprintf <<'MAKE_FRAG', $add_meta;
sub patternify {
my($unix) = @_;
my(@mac);
- use bytes; # Non-UTF-8 high bytes below.
+ use ExtUtils::MakeMaker::bytes; # Non-UTF-8 high bytes below.
foreach (split(/[ \t\n]+/, $unix)) {
if (m|/|) {
use vars qw($VERSION @ISA
$Is_Mac $Is_OS2 $Is_VMS $Is_Win32 $Is_Win95 $Is_Dos $Is_VOS
- $Is_QNX $Is_AIX $Is_OSF $Is_IRIX $Is_NetBSD
+ $Is_QNX $Is_AIX $Is_OSF $Is_IRIX $Is_NetBSD $Is_BSD
$Is_SunOS4 $Is_Solaris $Is_SunOS
$Verbose %pm %static $Xsubpp_Version
%Config_Override
$Is_SunOS4 = $^O eq 'sunos';
$Is_Solaris = $^O eq 'solaris';
$Is_SunOS = $Is_SunOS4 || $Is_Solaris;
+$Is_BSD = $^O =~ /^(?:free|net|open)bsd|bsdos$/;
=head1 NAME
}
else {
push(@otherfiles, qw[core core.*perl.*.? *perl.core]);
+
+ # core.\d+
+ push(@otherfiles, map { "core." . "[0-9]"x$_ } (1..5));
}
push @m, "\t-\$(RM_RF) @otherfiles\n";
CODE
return sprintf <<'MAKE_FRAG', $date_check;
-dist : $(DIST_DEFAULT)
+dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE)
$(NOECHO) %s
MAKE_FRAG
}
my $stderr_duped = 0;
local *STDERR_COPY;
- unless ($^O =~ /^(?:free|net|open)bsd|bsdos$/) { # Search for '51535'.
- if( open(STDERR_COPY, '>&STDERR') ) {
- $stderr_duped = 1;
- }
- else {
- warn <<WARNING;
+ unless ($Is_BSD) {
+ if( open(STDERR_COPY, '>&STDERR') ) {
+ $stderr_duped = 1;
+ }
+ else {
+ warn <<WARNING;
find_perl() can't dup STDERR: $!
You might see some garbage while we search for Perl
WARNING
print "Executing $abs\n" if ($trace >= 2);
my $version_check = qq{$abs -e "require $ver; print qq{VER_OK\n}"};
- # To avoid using the unportable 2>&1 to suppress STDERR,
+ # To avoid using the unportable 2>&1 to supress STDERR,
# we close it before running the command.
# However, thanks to a thread library bug in many BSDs
# ( http://www.freebsd.org/cgi/query-pr.cgi?pr=51535 )
# we cannot use the fancier more portable way in here
# but instead need to use the traditional 2>&1 construct.
- if ($^O =~ /^(?:free|net|open)bsd|bsdos$/) {
- $val = `$version_check 2>&1`;
+ if ($Is_BSD) {
+ $val = `$version_check 2>&1`;
} else {
close STDERR if $stderr_duped;
$val = `$version_check`;
open STDERR, '>&STDERR_COPY' if $stderr_duped;
}
- print STDERR "Perl version check failed: '$version_check'\n"
- unless defined $val;
if ($val =~ /^VER_OK/) {
print "Using PERL=$abs\n" if $trace;
}
my @parentdir = split(/::/, $self->{PARENT_NAME});
- $self->{INST_LIBDIR} = $self->catdir($self->{INST_LIB},@parentdir);
- $self->{INST_ARCHLIBDIR} = $self->catdir($self->{INST_ARCHLIB},
- @parentdir);
- $self->{INST_AUTODIR} = $self->catdir($self->{INST_LIB},'auto',
- $self->{FULLEXT});
- $self->{INST_ARCHAUTODIR} = $self->catdir($self->{INST_ARCHLIB},
- 'auto',$self->{FULLEXT});
+ $self->{INST_LIBDIR} = $self->catdir('$(INST_LIB)', @parentdir);
+ $self->{INST_ARCHLIBDIR} = $self->catdir('$(INST_ARCHLIB)', @parentdir);
+ $self->{INST_AUTODIR} = $self->catdir('$(INST_LIB)', 'auto',
+ '$(FULLEXT)');
+ $self->{INST_ARCHAUTODIR} = $self->catdir('$(INST_ARCHLIB)', 'auto',
+ '$(FULLEXT)');
- $self->{INST_SCRIPT} ||= $self->catdir($Curdir,'blib','script');
+ $self->{INST_SCRIPT} ||= $self->catdir($Curdir,'blib','script');
$self->{INST_MAN1DIR} ||= $self->catdir($Curdir,'blib','man1');
$self->{INST_MAN3DIR} ||= $self->catdir($Curdir,'blib','man3');
$(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
$(NOECHO) $(PERLRUNINST) \
Makefile.PL DIR=}, $dir, q{ \
- FIRST_MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
+ MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
MAKEAPERL=1 NORECURS=1 CCCDLFLAGS=};
foreach (@ARGV){
$inpod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $inpod;
next if $inpod || /^\s*#/;
chop;
- # next unless /\$(([\w\:\']*)\bVERSION)\b.*\=/;
- next unless /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/;
+ next unless /(?<!\\)([\$*])(([\w\:\']*)\bVERSION)\b.*\=/;
my $eval = qq{
package ExtUtils::MakeMaker::_version;
no strict;
$(PERL_INC)/nostdio.h \
$(PERL_INC)/op.h \
$(PERL_INC)/opcode.h \
- $(PERL_INC)/opnames.h \
$(PERL_INC)/patchlevel.h \
$(PERL_INC)/perl.h \
- $(PERL_INC)/perlapi.h \
$(PERL_INC)/perlio.h \
$(PERL_INC)/perlsdio.h \
$(PERL_INC)/perlsfio.h \
$(PERL_INC)/thrdvar.h \
$(PERL_INC)/thread.h \
$(PERL_INC)/unixish.h \
- $(PERL_INC)/utf8.h \
- $(PERL_INC)/util.h \
- $(PERL_INC)/warnings.h
+ $(PERL_INC)/util.h
$(OBJECT) : $(PERL_HDRS)
} if $self->{OBJECT};
use File::Basename;
use vars qw($Revision @ISA $VERSION);
($VERSION) = '5.67';
-($Revision = substr(q$Revision: 1.91 $, 10)) =~ s/\s+$//;
+($Revision) = q$Revision: 1.95 $ =~ /Revision:\s+(\S+)/;
require ExtUtils::MM_Any;
require ExtUtils::MM_Unix;
push @m, "
EXE_FILES = @exefiles
+pure_all :: @to
+ \$(NOECHO) \$(NOOP)
+
realclean ::
";
while (($from,$to) = each %fromto) {
last unless defined $from;
my $todir;
- if ($to =~ m#[/>:\]]#) { $todir = dirname($to); }
- else { ($todir = $to) =~ s/[^\)]+$//; }
+ if ($to =~ m#[/>:\]]#) {
+ $todir = dirname($to);
+ }
+ else {
+ ($todir = $to) =~ s/[^\)]+$//;
+ }
$todir = $self->fixpath($todir,1);
push @m, "
$to : $from \$(FIRST_MAKEFILE) ${todir}\$(DIRFILESEP).exists
$(OBJECT) : $(PERL_INC)EXTERN.h, $(PERL_INC)INTERN.h, $(PERL_INC)XSUB.h
$(OBJECT) : $(PERL_INC)av.h, $(PERL_INC)cc_runtime.h, $(PERL_INC)config.h
$(OBJECT) : $(PERL_INC)cop.h, $(PERL_INC)cv.h, $(PERL_INC)embed.h
-$(OBJECT) : $(PERL_INC)embedvar.h, $(PERL_INC)fakethr.h, $(PERL_INC)form.h
+$(OBJECT) : $(PERL_INC)embedvar.h, $(PERL_INC)form.h
$(OBJECT) : $(PERL_INC)gv.h, $(PERL_INC)handy.h, $(PERL_INC)hv.h
$(OBJECT) : $(PERL_INC)intrpvar.h, $(PERL_INC)iperlsys.h, $(PERL_INC)keywords.h
$(OBJECT) : $(PERL_INC)mg.h, $(PERL_INC)nostdio.h, $(PERL_INC)op.h
-$(OBJECT) : $(PERL_INC)opcode.h, $(PERL_INC)opnames.h, $(PERL_INC)patchlevel.h
-$(OBJECT) : $(PERL_INC)perl.h, $(PERL_INC)perlapi.h, $(PERL_INC)perlio.h
-$(OBJECT) : $(PERL_INC)perlsdio.h, $(PERL_INC)perlsfio.h, $(PERL_INC)perlvars.h
+$(OBJECT) : $(PERL_INC)opcode.h, $(PERL_INC)patchlevel.h
+$(OBJECT) : $(PERL_INC)perl.h, $(PERL_INC)perlio.h
+$(OBJECT) : $(PERL_INC)perlsdio.h, $(PERL_INC)perlvars.h
$(OBJECT) : $(PERL_INC)perly.h, $(PERL_INC)pp.h, $(PERL_INC)pp_proto.h
$(OBJECT) : $(PERL_INC)proto.h, $(PERL_INC)regcomp.h, $(PERL_INC)regexp.h
$(OBJECT) : $(PERL_INC)regnodes.h, $(PERL_INC)scope.h, $(PERL_INC)sv.h
-$(OBJECT) : $(PERL_INC)thrdvar.h, $(PERL_INC)thread.h, $(PERL_INC)utf8.h
-$(OBJECT) : $(PERL_INC)util.h, $(PERL_INC)vmsish.h, $(PERL_INC)warnings.h
+$(OBJECT) : $(PERL_INC)thrdvar.h, $(PERL_INC)thread.h
+$(OBJECT) : $(PERL_INC)util.h, $(PERL_INC)vmsish.h
' if $self->{OBJECT};
BEGIN {require 5.005_03;}
-$VERSION = '6.10_03';
-($Revision = substr(q$Revision: 1.109 $, 10)) =~ s/\s+$//;
+$VERSION = '6.10_04';
+($Revision) = q$Revision: 1.111 $ =~ /Revision:\s+(\S+)/;
require Exporter;
use Config;
SITELIBEXP SITEARCHEXP
INC INCLUDE_EXT LDFROM LIB LIBPERL_A LIBS
- LINKTYPE MAKEAPERL MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET MYEXTLIB
- NAME NEEDS_LINKING NOECHO NO_META NORECURS NO_VC OBJECT OPTIMIZE
+ LINKTYPE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET
+ MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NORECURS NO_VC OBJECT OPTIMIZE
PERL_MALLOC_OK PERL PERLMAINCC PERLRUN PERLRUNINST PERL_CORE
PERL_SRC PERM_RW PERM_RWX
PL_FILES PM PM_FILTER PMLIBDIRS POLLUTE PPM_INSTALL_EXEC
INST_SCRIPT directory. Make realclean will delete them from there
again.
+If your executables start with something like #!perl or
+#!/usr/bin/perl MakeMaker will change this to the path of the perl
+'Makefile.PL' was invoked with so the programs will be sure to run
+properly even if perl is not in /usr/bin/perl.
+
=item FIRST_MAKEFILE
The name of the Makefile to be produced. This is used for the second
$VERSION = '1.00';
*VERSION = \'1.01';
- ( $VERSION ) = '$Revision: 1.109 $ ' =~ /\$Revision:\s+([^\s]+)/;
+ $VERSION = sprintf "%d.%03d", q$Revision: 1.111 $ =~ /(\d+)/g;
$FOO::VERSION = '1.10';
*FOO::VERSION = \'1.11';
our $VERSION = 1.2.3; # new for perl5.6.0
package ExtUtils::MakeMaker::FAQ;
-our $VERSION = '0.02';
+(our $VERSION) = sprintf "%03d", q$Revision: 1.6 $ =~ /Revision:\s+(\S+)/;
1;
__END__
=back
+=head2 Module Writing
+
+=over 4
+
+=item How do I keep my $VERSION up to date without resetting it manually?
+
+Often you want to manually set the $VERSION in the main module
+distribution because this is the version that everybody sees on CPAN
+and maybe you want to customize it a bit. But for all the other
+modules in your dist, $VERSION is really just bookkeeping and all that's
+important is it goes up every time the module is changed. Doing this
+by hand is a pain and you often forget.
+
+Simplest way to do it automatically is to use your version control
+system's revision number (you are using version control, right?).
+
+In CVS and RCS you use $Revision: 1.6 $ writing it like so:
+
+ $VERSION = sprintf "%d.%03d", q$Revision: 1.6 $ =~ /(\d+)/g;
+
+On your next check in, $Revision: 1.6 $ will magically be expanded to contain
+the current revision #.
+
+ $VERSION = sprintf "%d.%03d", q$Revision: 1.6 $ =~ /(\d+)/g;
+
+Every time the file is checked in the $Revision: 1.6 $ will be updated,
+updating your $VERSION.
+
+In CVS version 1.9 is followed by 1.10. Since CPAN compares version
+numbers numerically we use a sprintf() to convert 1.9 to 1.009 and
+1.10 to 1.010 which compare properly.
+
+If branches are involved (ie. $Revision: 1.5.3.4) its a little more
+complicated.
+
+ # must be all on one line or MakeMaker will get confused.
+ $VERSION = do { my @r = (q$Revision: 1.6 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r };
+
+
+=back
+
=head2 XS
=over 4
=head1 DESCRIPTION
This is a short tutorial on writing a simple module with MakeMaker.
+Its really not that hard.
+
=head2 The Mantra
There are lots more commands and options, but the above will do it.
+
=head2 The Layout
-The basic layout of a module looks something like this.
+The basic files in a module look something like this.
Makefile.PL
MANIFEST
lib/Your/Module.pm
That's all that's strictly necessary. There's additional files you might
-want to add:
+want:
lib/Your/Other/Module.pm
t/some_test.t
MANIFEST
lib/Your/Module.pm
+Filepaths in a MANIFEST always use Unix conventions (ie. /) even if you're
+not on Unix.
+
+You can write this by hand or generate it with 'make manifest'.
+
=item lib/
-This is the directory where your .pm files go. They are layed out
-according to namespace. So Foo::Bar is lib/Foo/Bar.pm.
+This is the directory where your .pm and .pod files you wish to have
+installed go. They are layed out according to namespace. So Foo::Bar
+is lib/Foo/Bar.pm.
=item t/
So t/foo.t. 'make test' will run these tests. The directory is flat,
you cannot, for example, have t/foo/bar.t run by 'make test'.
+Tests are run from the top level of your distribution. So inside a test
+you would refer to ./lib to enter the lib directory, for example.
+
=item Changes
-A log of changes you've made to this module.
+A log of changes you've made to this module. The layout is free-form.
+Here's an example:
+
+ 1.01 Fri Apr 11 00:21:25 PDT 2003
+ - thing() does some stuff now
+ - fixed the wiggy bug in withit()
+
+ 1.00 Mon Apr 7 00:57:15 PDT 2003
+ - "Rain of Frogs" now supported
=item README
+A short description of your module, what it does, why someone would use it
+and its limitations. CPAN automatically pulls your README file out of
+the archive and makes it available to CPAN users, it is the first thing
+they will read to decide if your module is right for them.
+
+
=item INSTALL
+Instructions on how to install your module along with any dependencies.
+Suggested information to include here:
+
+ any extra modules required for use
+ the minimum version of Perl required
+ if only works on certain operating systems
+
+
=item MANIFEST.SKIP
+A file full of regular expressions to exclude when using 'make
+manifest' to generate the MANIFEST. These regular expressions
+are checked against each filepath found in the distrubtion (so
+you're matching against "t/foo.t" not "foo.t").
+
+Here's a sample:
+
+ ~$ # ignore emacs and vim backup files
+ .bak$ # ignore manual backups
+ \# # ignore CVS old revision files and emacs temp files
+
+Since # can be used for comments, # must be escaped.
+
+MakeMaker comes with a default MANIFEST.SKIP to avoid things like
+version control directories and backup files. Specifying your own
+will override this default.
+
+
=item bin/
+
=back
=head1 SEE ALSO
L<perlmodstyle> gives stylistic help writing a module.
+L<perlnewmod> gives more information about how to write a module.
+
There are modules to help you through the process of writing a module:
L<ExtUtils::ModuleMaker>, L<Module::Setup>, L<CPAN::MakeMaker>
--- /dev/null
+package ExtUtils::MakeMaker::bytes;
+
+use vars qw($VERSION);
+$VERSION = 0.01;
+
+my $Have_Bytes = eval q{require bytes; 1;};
+
+sub import {
+ return unless $Have_Bytes;
+
+ shift;
+ unshift @_, 'bytes';
+
+ goto &bytes::import;
+}
+
+1;
+
+
+=head1 NAME
+
+ExtUtils::MakeMaker::bytes - Version agnostic bytes.pm
+
+=head1 SYNOPSIS
+
+ use just like bytes.pm
+
+=head1 DESCRIPTION
+
+bytes.pm was introduced with 5.6. This means any code which has 'use
+bytes' in it won't even compile on 5.5.X. Since bytes is a lexical
+pragma and must be used at compile time we can't simply wrap it in
+a BEGIN { eval 'use bytes' } block.
+
+ExtUtils::MakeMaker::bytes is just a very thin wrapper around bytes
+which works just like it when bytes.pm exists and everywhere else it
+does nothing.
+
+=cut
my $read = {};
local *M;
unless (open M, $mfile){
- warn "$mfile: $!";
- return $read;
+ warn "$mfile: $!";
+ return $read;
}
+ local $_;
while (<M>){
- chomp;
- next if /^#/;
+ chomp;
+ next if /^#/;
my($file, $comment) = /^(\S+)\s*(.*)/;
next unless $file;
- if ($Is_MacOS) {
- $file = _macify($file);
- $file =~ s/\\([0-3][0-7][0-7])/sprintf("%c", oct($1))/ge;
- }
- elsif ($Is_VMS) {
- require File::Basename;
- my($base,$dir) = File::Basename::fileparse($file);
- # Resolve illegal file specifications in the same way as tar
- $dir =~ tr/./_/;
- my(@pieces) = split(/\./,$base);
- if (@pieces > 2) { $base = shift(@pieces) . '.' . join('_',@pieces); }
- my $okfile = "$dir$base";
- warn "Debug: Illegal name $file changed to $okfile\n" if $Debug;
+ if ($Is_MacOS) {
+ $file = _macify($file);
+ $file =~ s/\\([0-3][0-7][0-7])/sprintf("%c", oct($1))/ge;
+ }
+ elsif ($Is_VMS) {
+ require File::Basename;
+ my($base,$dir) = File::Basename::fileparse($file);
+ # Resolve illegal file specifications in the same way as tar
+ $dir =~ tr/./_/;
+ my(@pieces) = split(/\./,$base);
+ if (@pieces > 2) { $base = shift(@pieces) . '.' . join('_',@pieces); }
+ my $okfile = "$dir$base";
+ warn "Debug: Illegal name $file changed to $okfile\n" if $Debug;
$file = $okfile;
$file = lc($file) unless $file =~ /^MANIFEST(\.SKIP)?$/;
- }
+ }
$read->{$file} = $comment;
}
sub _maniskip {
my @skip ;
my $mfile = "$MANIFEST.SKIP";
- local *M;
+ local(*M,$_);
open M, $mfile or open M, $DEFAULT_MSKIP or return sub {0};
while (<M>){
chomp;
local(*F,*T);
open(F,"< $from\0") or die "Can't read $from: $!\n";
if (open(T,"< $to\0")) {
+ local $_;
while (<F>) { $diff++,last if $_ ne <T>; }
$diff++ unless eof(T);
close T;
my($additions) = shift;
_normalize($additions);
+ _fix_manifest($MANIFEST);
my $manifest = maniread();
open(MANIFEST, ">>$MANIFEST") or die "Could not open $MANIFEST: $!";
close MANIFEST;
}
+
+# Sometimes MANIFESTs are missing a trailing newline. Fix this.
+sub _fix_manifest {
+ my $manifest_file = shift;
+
+ open MANIFEST, $MANIFEST or die "Could not open $MANIFEST: $!";
+
+ # Yes, we should be using seek(), but I'd like to avoid loading POSIX
+ # to get SEEK_*
+ my @manifest = <MANIFEST>;
+ close MANIFEST;
+
+ unless( $manifest[-1] =~ /\n\z/ ) {
+ open MANIFEST, ">>$MANIFEST" or die "Could not open $MANIFEST: $!";
+ print MANIFEST "\n";
+ close MANIFEST;
+ }
+}
+
+
# UNIMPLEMENTED
sub _normalize {
return;
Initialize PERL_SRC to '' instead of leaving undef when outside the source
tree
+
+Reinstate HTMLification to use the new HTML Config info.
+
+split manifypods target into more generic docifypods target which depends on
+manifypods
+
+Add target to generate native Win32 help files (or whatever Win32 likes
+to use for help files these days)
+
+Add target to generate native VMS help files.
+
+Add "What's this META.yml thing?" to the FAQ.
+
+On VMS, write PM_FILTERs to a temp file and run from there avoiding command
+line lengths.
+
+Move oneliner() and friends into a seperate module for general consumption.
+
+Make out of date check on 'make dist' more useful
+http://archive.develooper.com/makemaker@perl.org/msg01075.html
write => 'install-test/packlist'
},
0, 1);
-ok( ! -d 'install-test/lib/perl', 'install made dir - dry run' );
-ok( ! -r 'install-test/lib/perl/Big/Dummy.pm', ' .pm file installed - dry run' );
-ok( ! -r 'install-test/packlist', ' packlist exists - dry run' );
+ok( ! -d 'install-test/lib/perl', 'install made dir (dry run)');
+ok( ! -r 'install-test/lib/perl/Big/Dummy.pm',
+ ' .pm file installed (dry run)');
+ok( ! -r 'install-test/packlist', ' packlist exists (dry run)');
install( { 'blib/lib' => 'install-test/lib/perl',
read => 'install-test/packlist',
use strict;
# these files help the test run
-use Test::More tests => 37;
+use Test::More tests => 39;
use Cwd;
# these files are needed for the module itself
@INC = map { File::Spec->rel2abs($_) } @INC;
# keep track of everything added so it can all be deleted
-my %files;
+my %Files;
sub add_file {
my ($file, $data) = @_;
$data ||= 'foo';
- unlink $file; # or else we'll get multiple versions on VMS
+ 1 while unlink $file; # or else we'll get multiple versions on VMS
open( T, '>'.$file) or return;
print T $data;
- ++$files{$file};
+ ++$Files{$file};
close T;
}
"manifind found moretest/quux" );
# only MANIFEST and foo are in the manifest
+$_ = 'foo';
my $files = maniread();
is( keys %$files, 2, 'two files found' );
is( join(' ', sort { lc($a) cmp lc($b) } keys %$files), 'foo MANIFEST',
'both files found' );
+is( $_, 'foo', q{maniread() doesn't clobber $_} );
# poison the manifest, and add a comment that should be reported
add_file( 'MANIFEST', 'none #none' );
like( $warn, qr/Added to albatross: /, 'using a new manifest file' );
# add the new file to the list of files to be deleted
- $files{'albatross'}++;
+ $Files{'albatross'}++;
}
is( $files->{yarrow}, 'hock',' with comment' );
is( $files->{foobar}, '', ' preserved old entries' );
+add_file('MANIFEST' => 'Makefile.PL');
+maniadd({ 'META.yml' => 'Module meta-data (added by MakeMaker)' });
+$files = maniread;
+# VMS downcases the MANIFEST. We normalize it here to match.
+%$files = map { (lc $_ => $files->{$_}) } keys %$files;
+my %expect = ( 'makefile.pl' => '',
+ 'meta.yml' => 'Module meta-data (added by MakeMaker)'
+ );
+is_deeply( $files, \%expect, 'maniadd() vs MANIFEST without trailing newline');
END {
# the args are evaluated in scalar context
- is( unlink( keys %files ), keys %files, 'remove all added files' );
+ is( unlink( keys %Files ), keys %Files, 'remove all added files' );
remove_dir( 'moretest', 'copy' );
# now get rid of the parent directory
# VMS is non-case preserving, so we can't know what the MANIFEST will
# look like. :(
_normalize($manifest);
-is( $manifest->{'meta.yml'}, 'Module meta-data in YAML' );
+is( $manifest->{'meta.yml'}, 'Module meta-data (added by MakeMaker)' );
# Test NO_META META.yml suppression
unlink 'META.yml';
--- /dev/null
+#!/usr/bin/perl -w
+
+BEGIN {
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', 'lib');
+ }
+ else {
+ unshift @INC, 't/lib';
+ }
+}
+
+use strict;
+use Test::More tests => 4;
+
+use_ok('ExtUtils::MakeMaker::bytes');
+
+SKIP: {
+ skip "bytes.pm appeared in 5.6", 3 if $] < 5.006;
+
+ my $chr = chr(400);
+ is( length $chr, 1 );
+
+ {
+ use ExtUtils::MakeMaker::bytes;
+ is( length $chr, 2, 'byte.pm in effect' );
+ }
+
+ is( length $chr, 1, ' score is lexical' );
+}
--- /dev/null
+#!/usr/bin/perl -w
+
+BEGIN {
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', 'lib');
+ }
+ else {
+ unshift @INC, 't/lib';
+ }
+}
+
+use strict;
+use Test::More tests => 1;
+
+use_ok('ExtUtils::MakeMaker::vmsish');
+