Browse files

Deprecate Perl 5.4. Next step will be Dist::Zilla for building distros.

  • Loading branch information...
1 parent 31c0c9e commit 04cad87e74762c0c7496a37d02b82cbb049a4610 @rcaputo committed Jan 26, 2011
Showing with 127 additions and 233 deletions.
  1. +0 −2 MANIFEST
  2. +116 −18 Makefile.PL
  3. +0 −70 mylib/Makefile-5004.pm
  4. +0 −140 mylib/Makefile-5005.pm
  5. +11 −3 mylib/PoeBuildInfo.pm
View
2 MANIFEST
@@ -69,8 +69,6 @@ lib/POE/Wheel/ReadWrite.pm
lib/POE/Wheel/Run.pm
lib/POE/Wheel/SocketFactory.pm
mylib/Devel/Null.pm
-mylib/Makefile-5004.pm
-mylib/Makefile-5005.pm
mylib/MyOtherFreezer.pm
mylib/PoeBuildInfo.pm
mylib/coverage.perl
View
134 Makefile.PL
@@ -1,4 +1,6 @@
#!/usr/bin/perl
+# rocco // vim: ts=2 sw=2 expandtab
+
use strict;
use ExtUtils::MakeMaker;
@@ -52,27 +54,123 @@ unless ($ret =~ /^Y$/i) {
print "\n";
-# Which kind of makefile should we build?
+use lib qw(./mylib);
+use PoeBuildInfo qw(
+ TEST_FILES
+ CLEAN_FILES
+ CORE_REQUIREMENTS
+ DIST_ABSTRACT
+ DIST_AUTHOR
+ RECOMMENDED_TIME_HIRES
+);
-if ($] < 5.005004) {
- warn(
- "\n",
- "===============================================================\n",
- "\n",
- "Please upgrade Perl to avoid lapses in support. Perl 5.005_04\n",
- "or newer is preferred. Support for older versions will be\n",
- "phased out in the future.\n",
- "\n",
- "Thank you.\n",
- "\n",
- "===============================================================\n",
- "\n",
- );
+### Touch files that will be generated at "make dist" time.
+### ExtUtils::MakeMaker and Module::Build will complain about them if
+### they aren't present now.
+
+open(TOUCH, ">>CHANGES") and close TOUCH;
+open(TOUCH, ">>META.yml") and close TOUCH;
+
+### Touch gen-tests.perl so it always triggers.
+
+utime(time(), time(), "mylib/gen-tests.perl");
+
+### Some advisory dependency testing.
+
+sub check_for_modules {
+ my ($dep_type, @modules) = @_;
+
+ my @failures;
+ while (@modules) {
+ my $module = shift @modules;
+ my $target = shift @modules;
+
+ my $version = eval "use $module (); return \$$module\::VERSION";
- require "./mylib/Makefile-5004.pm";
+ if ($@) {
+ push(
+ @failures,
+ "*** $module $target could not be loaded.\n"
+ );
+ }
+ elsif ($version < $target) {
+ push(
+ @failures,
+ "*** $module $target is $dep_type, " .
+ "but version $version is installed.\n"
+ );
+ }
+ }
+
+ if (@failures) {
+ warn(
+ "*** Some $dep_type features may not be available:\n",
+ @failures,
+ );
+ }
}
-else {
- require "./mylib/Makefile-5005.pm";
+
+check_for_modules("required", CORE_REQUIREMENTS);
+check_for_modules(
+ "optional",
+ "Compress::Zlib" => 1.33,
+ "Curses" => 1.08,
+ "IO::Poll" => 0.01,
+ "IO::Pty" => 1.02,
+ "LWP" => 5.79,
+ "Socket6" => 0.14,
+ "Storable" => 2.12,
+ "Term::Cap" => 1.09,
+ "Term::ReadKey" => 2.21,
+ RECOMMENDED_TIME_HIRES,
+ "URI" => 1.30,
+);
+
+### Generate Makefile.PL.
+
+sub MY::postamble {
+ return <<EOF;
+
+ppmdist: pm_to_blib
+\cI\$(TAR) --exclude '*/man[13]*' -cvf \\
+\cI\cI\$(DISTVNAME)-win32ppd.tar blib
+\cI\$(COMPRESS) \$(DISTVNAME)-win32ppd.tar
+
+ppddist: ppmdist
+
+coverage: Makefile
+\cI$^X mylib/coverage.perl
+
+cover: coverage
+EOF
}
+WriteMakefile(
+ NAME => 'POE',
+ AUTHOR => DIST_AUTHOR,
+ ABSTRACT => DIST_ABSTRACT,
+
+ VERSION_FROM => 'lib/POE.pm',
+ dist => {
+ COMPRESS => 'gzip -9f',
+ SUFFIX => 'gz',
+ PREOP => (
+ 'git-log.pl | ' .
+ '/usr/bin/tee ./$(DISTNAME)-$(VERSION)/CHANGES > ./CHANGES; ' .
+ "$^X mylib/gen-meta.perl; " .
+ '/bin/cp -f ./META.yml ./$(DISTNAME)-$(VERSION)/META.yml'
+ ),
+ },
+
+ clean => { FILES => CLEAN_FILES },
+ test => { TESTS => TEST_FILES },
+
+ # Not executed on "make test".
+ PL_FILES => { 'mylib/gen-tests.perl' => [ 'lib/POE.pm' ] },
+
+ # More for META.yml than anything.
+ NO_META => 1,
+ PREREQ_PM => { CORE_REQUIREMENTS },
+);
+
1;
View
70 mylib/Makefile-5004.pm
@@ -1,70 +0,0 @@
-#!/usr/bin/perl
-# rocco // vim: ts=2 sw=2 expandtab
-
-use strict;
-
-use ExtUtils::MakeMaker;
-
-use lib qw(./mylib);
-use PoeBuildInfo qw(
- TEST_FILES
- CLEAN_FILES
- CORE_REQUIREMENTS
-);
-
-### Touch files that will be generated at "make dist" time.
-### ExtUtils::MakeMaker and Module::Build will complain about them if
-### they aren't present now.
-
-open(TOUCH, ">>CHANGES") and close TOUCH;
-open(TOUCH, ">>META.yml") and close TOUCH;
-
-### Touch gen-tests.perl so it always triggers.
-
-utime(time(), time(), "mylib/gen-tests.perl");
-
-### Generate Makefile.PL.
-
-sub MY::postamble {
- return <<EOF;
-coverage: Makefile
-\cI$^X mylib/coverage.perl
-
-cover: coverage
-
-ppmdist:
-\cIecho Use a modern version of Perl to build the PPM distribution.
-\cIfalse
-EOF
-}
-
-WriteMakefile(
- NAME => 'POE',
- VERSION_FROM => 'lib/POE.pm',
-
- dist => {
- COMPRESS => 'gzip -9f',
- SUFFIX => 'gz',
- PREOP => (
- 'echo Use a modern version of Perl to build distributions.; ' .
- 'false'
- ),
- },
-
- clean => {
- FILES => CLEAN_FILES,
- },
-
- test => {
- TESTS => TEST_FILES,
- },
-
- # Not executed on "make test".
- PL_FILES => {
- 'mylib/gen-tests.perl' => [ 'lib/POE.pm' ],
- },
-
- PREREQ_PM => { CORE_REQUIREMENTS },
-);
-
-1;
View
140 mylib/Makefile-5005.pm
@@ -1,140 +0,0 @@
-#!/usr/bin/perl
-# rocco // vim: ts=2 sw=2 expandtab
-
-use strict;
-
-use ExtUtils::MakeMaker;
-
-use lib qw(./mylib);
-use PoeBuildInfo qw(
- TEST_FILES
- CLEAN_FILES
- CORE_REQUIREMENTS
- DIST_ABSTRACT
- DIST_AUTHOR
- RECOMMENDED_TIME_HIRES
-);
-
-### Touch files that will be generated at "make dist" time.
-### ExtUtils::MakeMaker and Module::Build will complain about them if
-### they aren't present now.
-
-open(TOUCH, ">>CHANGES") and close TOUCH;
-open(TOUCH, ">>META.yml") and close TOUCH;
-
-### Touch gen-tests.perl so it always triggers.
-
-utime(time(), time(), "mylib/gen-tests.perl");
-
-### Some advisory dependency testing.
-
-sub check_for_modules {
- my ($dep_type, @modules) = @_;
-
- my @failures;
- while (@modules) {
- my $module = shift @modules;
- my $target = shift @modules;
-
- my $version = eval "use $module (); return \$$module\::VERSION";
-
- if ($@) {
- push(
- @failures,
- "*** $module $target could not be loaded.\n"
- );
- }
- elsif ($version < $target) {
- push(
- @failures,
- "*** $module $target is $dep_type, " .
- "but version $version is installed.\n"
- );
- }
- }
-
- if (@failures) {
- warn(
- "*** Some $dep_type features may not be available:\n",
- @failures,
- );
- }
-}
-
-check_for_modules("required", CORE_REQUIREMENTS);
-check_for_modules(
- "optional",
- "Compress::Zlib" => 1.33,
- "Curses" => 1.08,
- "IO::Poll" => 0.01,
- "IO::Pty" => 1.02,
- "LWP" => 5.79,
- "Socket6" => 0.14,
- "Storable" => 2.12,
- "Term::Cap" => 1.09,
- "Term::ReadKey" => 2.21,
- RECOMMENDED_TIME_HIRES,
- "URI" => 1.30,
-);
-
-### Generate Makefile.PL.
-
-sub MY::postamble {
- return <<EOF;
-
-ppmdist: pm_to_blib
-\cI\$(TAR) --exclude '*/man[13]*' -cvf \\
-\cI\cI\$(DISTVNAME)-win32ppd.tar blib
-\cI\$(COMPRESS) \$(DISTVNAME)-win32ppd.tar
-
-ppddist: ppmdist
-
-coverage: Makefile
-\cI$^X mylib/coverage.perl
-
-cover: coverage
-EOF
-}
-
-WriteMakefile(
- NAME => 'POE',
-
- (
- ($^O eq 'MacOS')
- ? ()
- : ( AUTHOR => DIST_AUTHOR,
- ABSTRACT => DIST_ABSTRACT,
- )
- ),
-
- VERSION_FROM => 'lib/POE.pm',
- dist => {
- COMPRESS => 'gzip -9f',
- SUFFIX => 'gz',
- PREOP => (
- 'git-log.pl | ' .
- '/usr/bin/tee ./$(DISTNAME)-$(VERSION)/CHANGES > ./CHANGES; ' .
- "$^X mylib/gen-meta.perl; " .
- '/bin/cp -f ./META.yml ./$(DISTNAME)-$(VERSION)/META.yml'
- ),
- },
-
- clean => {
- FILES => CLEAN_FILES,
- },
-
- test => {
- TESTS => TEST_FILES,
- },
-
- # Not executed on "make test".
- PL_FILES => {
- 'mylib/gen-tests.perl' => [ 'lib/POE.pm' ],
- },
-
- # More for META.yml than anything.
- NO_META => 1,
- PREREQ_PM => { CORE_REQUIREMENTS },
-);
-
-1;
View
14 mylib/PoeBuildInfo.pm
@@ -70,18 +70,26 @@ sub DIST_ABSTRACT () {
sub CLEAN_FILES () {
my @clean_files = qw(
+ */*/*/*/*~
+ */*/*/*~
+ */*/*/*~
+ */*/*~
+ */*~
+ *~
+ META.yml
+ Makefile.old
bingos-followtail
coverage.report
poe_report.xml
run_network_tests
- test-output.err
t/20_resources/10_perl
t/20_resources/10_perl/*
t/20_resources/20_xs
t/20_resources/20_xs/*
- t/30_loops/*/*
- t/30_loops/*
t/30_loops
+ t/30_loops/*
+ t/30_loops/*/*
+ test-output.err
);
"@clean_files";
}

0 comments on commit 04cad87

Please sign in to comment.