From e271eed76c983e123f4a9eb6bcd8783f9fc96201 Mon Sep 17 00:00:00 2001 From: Dan Book Date: Wed, 8 Sep 2021 14:30:03 -0400 Subject: [PATCH 1/3] move PoeBuildInfo information back into Makefile.PL --- MANIFEST | 1 - Makefile.PL | 105 ++++++++++++++++++++++++++++++++---- mylib/PoeBuildInfo.pm | 121 ------------------------------------------ 3 files changed, 94 insertions(+), 133 deletions(-) delete mode 100644 mylib/PoeBuildInfo.pm diff --git a/MANIFEST b/MANIFEST index b8d0ac1e2..d5369c82a 100644 --- a/MANIFEST +++ b/MANIFEST @@ -71,7 +71,6 @@ lib/POE/Wheel/SocketFactory.pm mylib/Devel/Null.pm mylib/ForkingDaemon.pm mylib/MyOtherFreezer.pm -mylib/PoeBuildInfo.pm mylib/coverage.perl mylib/cpan-test.perl mylib/events_per_second.pl diff --git a/Makefile.PL b/Makefile.PL index aa6d83aa6..811571e29 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -82,17 +82,100 @@ unless ($ret =~ /^Y$/i) { print "\n"; -use lib qw(./mylib); -use PoeBuildInfo qw( - TEST_FILES - CLEAN_FILES - CORE_REQUIREMENTS - DIST_ABSTRACT - DIST_AUTHOR - CONFIG_REQUIREMENTS - HOMEPAGE - REPOSITORY -); +sub CONFIG_REQUIREMENTS () { + ( + "POE::Test::Loops" => '1.360', + ); +} + +sub CORE_REQUIREMENTS () { + my @core_requirements = ( + "Carp" => 0, + "Errno" => 1.09, + "Exporter" => 0, + "File::Spec" => 0.87, + "IO" => 1.24, # MSWin32 blocking(0) + "IO::Handle" => 1.27, + "IO::Pipely" => 0.005, + "POSIX" => 1.02, + "Socket" => 1.7, + "Storable" => 2.16, + "Test::Harness" => 2.26, + "Time::HiRes" => 1.59, + CONFIG_REQUIREMENTS, + ); + + if ($^O eq "MSWin32") { + push @core_requirements, ( + "Win32::Console" => 0.031, + "Win32API::File" => 0.05, + "Win32::Job" => 0.03, + "Win32::Process" => 0, + "Win32" => 0, + ); + } + elsif ($^O eq 'cygwin') { + # Skip IO::Tty. It has trouble building as of this writing. + } + else { + push @core_requirements, ( + "IO::Tty" => 1.08, # avoids crashes on fbsd + ); + } + + return @core_requirements; +} + +sub DIST_AUTHOR () { + ( 'Rocco Caputo ' ) +} + +sub DIST_ABSTRACT () { + ( 'Portable, event-loop agnostic eventy networking and multitasking.' ) +} + +sub CLEAN_FILES () { + my @clean_files = qw( + */*/*/*/*~ + */*/*/*~ + */*/*/*~ + */*/*~ + */*~ + *~ + META.yml + Makefile.old + bingos-followtail + coverage.report + poe_report.xml + run_network_tests + 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/*/* + test-output.err + ); + "@clean_files"; +} + +sub TEST_FILES () { + my @test_files = qw( + t/*.t + t/*/*.t + t/*/*/*.t + ); + "@test_files"; +} + +sub REPOSITORY () { + 'https://github.com/rcaputo/poe' +} + +sub HOMEPAGE () { + 'http://poe.perl.org/' +} ### Touch files that will be generated at "make dist" time. ### ExtUtils::MakeMaker will complain about them if diff --git a/mylib/PoeBuildInfo.pm b/mylib/PoeBuildInfo.pm deleted file mode 100644 index 573749fb5..000000000 --- a/mylib/PoeBuildInfo.pm +++ /dev/null @@ -1,121 +0,0 @@ -# vim: ts=2 sw=2 expandtab - -# Build information for POE. Moved into a library so it can be -# required by Makefile.PL and gen-meta.perl. - -package PoeBuildInfo; - -use strict; - -use Exporter; -use vars qw(@ISA @EXPORT_OK); -push @ISA, qw(Exporter); - -@EXPORT_OK = qw( - TEST_FILES - CLEAN_FILES - CORE_REQUIREMENTS - DIST_ABSTRACT - DIST_AUTHOR - CONFIG_REQUIREMENTS - REPOSITORY - HOMEPAGE -); - - -sub CONFIG_REQUIREMENTS () { - ( - "POE::Test::Loops" => '1.360', - ); -} - -sub CORE_REQUIREMENTS () { - my @core_requirements = ( - "Carp" => 0, - "Errno" => 1.09, - "Exporter" => 0, - "File::Spec" => 0.87, - "IO" => 1.24, # MSWin32 blocking(0) - "IO::Handle" => 1.27, - "IO::Pipely" => 0.005, - "POSIX" => 1.02, - "Socket" => 1.7, - "Storable" => 2.16, - "Test::Harness" => 2.26, - "Time::HiRes" => 1.59, - CONFIG_REQUIREMENTS, - ); - - if ($^O eq "MSWin32") { - push @core_requirements, ( - "Win32::Console" => 0.031, - "Win32API::File" => 0.05, - "Win32::Job" => 0.03, - "Win32::Process" => 0, - "Win32" => 0, - ); - } - elsif ($^O eq 'cygwin') { - # Skip IO::Tty. It has trouble building as of this writing. - } - else { - push @core_requirements, ( - "IO::Tty" => 1.08, # avoids crashes on fbsd - ); - } - - return @core_requirements; -} - -sub DIST_AUTHOR () { - ( 'Rocco Caputo ' ) -} - -sub DIST_ABSTRACT () { - ( 'Portable, event-loop agnostic eventy networking and multitasking.' ) -} - -sub CLEAN_FILES () { - my @clean_files = qw( - */*/*/*/*~ - */*/*/*~ - */*/*/*~ - */*/*~ - */*~ - *~ - META.yml - Makefile.old - bingos-followtail - coverage.report - poe_report.xml - run_network_tests - 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/*/* - test-output.err - ); - "@clean_files"; -} - -sub TEST_FILES () { - my @test_files = qw( - t/*.t - t/*/*.t - t/*/*/*.t - ); - "@test_files"; -} - -sub REPOSITORY () { - 'https://github.com/rcaputo/poe' -} - -sub HOMEPAGE () { - 'http://poe.perl.org/' -} - -1; From 968f35399467eb516f50e71333066e9bf29b7780 Mon Sep 17 00:00:00 2001 From: Dan Book Date: Wed, 8 Sep 2021 14:34:22 -0400 Subject: [PATCH 2/3] Only include dynamic dependencies when installing, so they are not included in the static dependency list --- Makefile.PL | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 811571e29..07b3bb657 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -105,22 +105,24 @@ sub CORE_REQUIREMENTS () { CONFIG_REQUIREMENTS, ); - if ($^O eq "MSWin32") { - push @core_requirements, ( - "Win32::Console" => 0.031, - "Win32API::File" => 0.05, - "Win32::Job" => 0.03, - "Win32::Process" => 0, - "Win32" => 0, - ); - } - elsif ($^O eq 'cygwin') { - # Skip IO::Tty. It has trouble building as of this writing. - } - else { - push @core_requirements, ( - "IO::Tty" => 1.08, # avoids crashes on fbsd - ); + if (-f 'META.yml') { # only include dynamic deps when installing + if ($^O eq "MSWin32") { + push @core_requirements, ( + "Win32::Console" => 0.031, + "Win32API::File" => 0.05, + "Win32::Job" => 0.03, + "Win32::Process" => 0, + "Win32" => 0, + ); + } + elsif ($^O eq 'cygwin') { + # Skip IO::Tty. It has trouble building as of this writing. + } + else { + push @core_requirements, ( + "IO::Tty" => 1.08, # avoids crashes on fbsd + ); + } } return @core_requirements; From 61503c4663be9da2720b8db6b2d75910b5882358 Mon Sep 17 00:00:00 2001 From: Dan Book Date: Wed, 8 Sep 2021 14:39:33 -0400 Subject: [PATCH 3/3] quote dependency versions --- Makefile.PL | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 07b3bb657..c06b99cde 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -91,26 +91,26 @@ sub CONFIG_REQUIREMENTS () { sub CORE_REQUIREMENTS () { my @core_requirements = ( "Carp" => 0, - "Errno" => 1.09, + "Errno" => '1.09', "Exporter" => 0, - "File::Spec" => 0.87, - "IO" => 1.24, # MSWin32 blocking(0) - "IO::Handle" => 1.27, - "IO::Pipely" => 0.005, - "POSIX" => 1.02, - "Socket" => 1.7, - "Storable" => 2.16, - "Test::Harness" => 2.26, - "Time::HiRes" => 1.59, + "File::Spec" => '0.87', + "IO" => '1.24', # MSWin32 blocking(0) + "IO::Handle" => '1.27', + "IO::Pipely" => '0.005', + "POSIX" => '1.02', + "Socket" => '1.7', + "Storable" => '2.16', + "Test::Harness" => '2.26', + "Time::HiRes" => '1.59', CONFIG_REQUIREMENTS, ); if (-f 'META.yml') { # only include dynamic deps when installing if ($^O eq "MSWin32") { push @core_requirements, ( - "Win32::Console" => 0.031, - "Win32API::File" => 0.05, - "Win32::Job" => 0.03, + "Win32::Console" => '0.031', + "Win32API::File" => '0.05', + "Win32::Job" => '0.03', "Win32::Process" => 0, "Win32" => 0, ); @@ -120,7 +120,7 @@ sub CORE_REQUIREMENTS () { } else { push @core_requirements, ( - "IO::Tty" => 1.08, # avoids crashes on fbsd + "IO::Tty" => '1.08', # avoids crashes on fbsd ); } } @@ -227,14 +227,14 @@ sub check_for_modules { 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, - "Term::Cap" => 1.10, - "Term::ReadKey" => 2.21, - "URI" => 1.30, + "Compress::Zlib" => '1.33', + "Curses" => '1.08', + "IO::Poll" => '0.01', + "IO::Pty" => '1.02', + "LWP" => '5.79', + "Term::Cap" => '1.10', + "Term::ReadKey" => '2.21', + "URI" => '1.30', ); # check for optional IPv6 stuff