1 package Test2::API::Breakage;
5 our $VERSION = '1.302169';
8 use Test2::Util qw/pkg_to_file/;
15 BEGIN { require Exporter; our @ISA = qw(Exporter) }
17 sub upgrade_suggested {
19 'Test::Exception' => '0.42',
20 'Test::FITesque' => '0.04',
21 'Test::Module::Used' => '0.2.5',
22 'Test::Moose::More' => '0.025',
26 sub upgrade_required {
28 'Test::Builder::Clutch' => '0.07',
29 'Test::Dist::VersionSync' => '1.1.4',
30 'Test::Modern' => '0.012',
31 'Test::SharedFork' => '0.34',
32 'Test::Alien' => '0.04',
33 'Test::UseAllModules' => '0.14',
34 'Test::More::Prefix' => '0.005',
36 'Test2::Tools::EventDumper' => 0.000007,
37 'Test2::Harness' => 0.000013,
39 'Test::DBIx::Class::Schema' => '1.0.9',
40 'Test::Clustericious::Cluster' => '0.30',
46 'Net::BitTorrent' => '0.052',
47 'Test::Able' => '0.11',
48 'Test::Aggregate' => '0.373',
49 'Test::Flatten' => '0.11',
50 'Test::Group' => '0.20',
51 'Test::ParallelSubtest' => '0.05',
52 'Test::Pretty' => '0.32',
53 'Test::Wrapper' => '0.3.0',
55 'Log::Dispatch::Config::TestLog' => '0.02',
60 # Device::Chip => 0.07 - Tests will not pass, but not broken if already installed, also no fixed version we can upgrade to.
66 my %suggest = __PACKAGE__->upgrade_suggested();
67 my %required = __PACKAGE__->upgrade_required();
68 my %broken = __PACKAGE__->known_broken();
71 for my $mod (keys %suggest) {
72 my $file = pkg_to_file($mod);
73 next unless $INC{$file} || ($require && eval { require $file; 1 });
74 my $want = $suggest{$mod};
75 next if eval { $mod->VERSION($want); 1 };
76 push @warn => " * Module '$mod' is outdated, we recommend updating above $want.";
79 for my $mod (keys %required) {
80 my $file = pkg_to_file($mod);
81 next unless $INC{$file} || ($require && eval { require $file; 1 });
82 my $want = $required{$mod};
83 next if eval { $mod->VERSION($want); 1 };
84 push @warn => " * Module '$mod' is outdated and known to be broken, please update to $want or higher.";
87 for my $mod (keys %broken) {
88 my $file = pkg_to_file($mod);
89 next unless $INC{$file} || ($require && eval { require $file; 1 });
90 my $tested = $broken{$mod};
91 push @warn => " * Module '$mod' is known to be broken in version $tested and below, newer versions have not been tested. You have: " . $mod->VERSION;
108 Test2::API::Breakage - What breaks at what version
112 This module provides lists of modules that are broken, or have been broken in
113 the past, when upgrading L<Test::Builder> to use L<Test2>.
117 These can be imported, or called as methods on the class.
121 =item %mod_ver = upgrade_suggested()
123 =item %mod_ver = Test2::API::Breakage->upgrade_suggested()
125 This returns key/value pairs. The key is the module name, the value is the
126 version number. If the installed version of the module is at or below the
127 specified one then an upgrade would be a good idea, but not strictly necessary.
129 =item %mod_ver = upgrade_required()
131 =item %mod_ver = Test2::API::Breakage->upgrade_required()
133 This returns key/value pairs. The key is the module name, the value is the
134 version number. If the installed version of the module is at or below the
135 specified one then an upgrade is required for the module to work properly.
137 =item %mod_ver = known_broken()
139 =item %mod_ver = Test2::API::Breakage->known_broken()
141 This returns key/value pairs. The key is the module name, the value is the
142 version number. If the installed version of the module is at or below the
143 specified one then the module will not work. A newer version may work, but is
144 not tested or verified.
150 The source code repository for Test2 can be found at
151 F<http://github.com/Test-More/test-more/>.
157 =item Chad Granum E<lt>exodist@cpan.orgE<gt>
165 =item Chad Granum E<lt>exodist@cpan.orgE<gt>
171 Copyright 2019 Chad Granum E<lt>exodist@cpan.orgE<gt>.
173 This program is free software; you can redistribute it and/or
174 modify it under the same terms as Perl itself.
176 See F<http://dev.perl.org/licenses/>