diff -Nru libdbix-runsql-perl-0.21/bin/run-sql.pl libdbix-runsql-perl-0.22/bin/run-sql.pl --- libdbix-runsql-perl-0.21/bin/run-sql.pl 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/bin/run-sql.pl 2021-05-03 14:06:16.000000000 +0000 @@ -3,7 +3,7 @@ use warnings; use DBIx::RunSQL; -our $VERSION = '0.21'; +our $VERSION = '0.22'; my $exitcode = DBIx::RunSQL->handle_command_line('myapp', \@ARGV); exit $exitcode; diff -Nru libdbix-runsql-perl-0.21/Changes libdbix-runsql-perl-0.22/Changes --- libdbix-runsql-perl-0.21/Changes 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/Changes 2021-05-03 14:06:16.000000000 +0000 @@ -1,3 +1,9 @@ +0.22 2021-05-03 + * Allow pass-through of DBI database options for ->create() + * Move URLs to https:// + * Documentation updates + + 0.21 2019-03-09 * Use Module::Load to load renderers * Check if a class isa Text::Table, otherwise dispatch to Text::Table::Any diff -Nru libdbix-runsql-perl-0.21/debian/changelog libdbix-runsql-perl-0.22/debian/changelog --- libdbix-runsql-perl-0.21/debian/changelog 2019-11-03 17:50:34.000000000 +0000 +++ libdbix-runsql-perl-0.22/debian/changelog 2021-09-28 14:46:30.000000000 +0000 @@ -1,3 +1,19 @@ +libdbix-runsql-perl (0.22-1) unstable; urgency=medium + + * Team upload. + + [ Jenkins ] + * Bump debhelper from old 12 to 13. + * Update standards version to 4.5.1, no changes needed. + + [ gregor herrmann ] + * Import upstream version 0.22. + * Update years of upstream copyright. + * Declare compliance with Debian Policy 4.6.0. + * Set Rules-Requires-Root: no. + + -- gregor herrmann Tue, 28 Sep 2021 16:46:30 +0200 + libdbix-runsql-perl (0.21-1) unstable; urgency=medium * Team upload. diff -Nru libdbix-runsql-perl-0.21/debian/control libdbix-runsql-perl-0.22/debian/control --- libdbix-runsql-perl-0.21/debian/control 2019-11-03 17:50:34.000000000 +0000 +++ libdbix-runsql-perl-0.22/debian/control 2021-09-28 14:46:30.000000000 +0000 @@ -4,15 +4,16 @@ Section: perl Testsuite: autopkgtest-pkg-perl Priority: optional -Build-Depends: debhelper-compat (= 12) -Build-Depends-Indep: libdbi-perl , - libdbd-sqlite3-perl , +Build-Depends: debhelper-compat (= 13) +Build-Depends-Indep: libdbd-sqlite3-perl , + libdbi-perl , libtext-table-perl , perl -Standards-Version: 4.4.1 +Standards-Version: 4.6.0 Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libdbix-runsql-perl Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libdbix-runsql-perl.git Homepage: https://metacpan.org/release/DBIx-RunSQL +Rules-Requires-Root: no Package: libdbix-runsql-perl Architecture: all diff -Nru libdbix-runsql-perl-0.21/debian/copyright libdbix-runsql-perl-0.22/debian/copyright --- libdbix-runsql-perl-0.21/debian/copyright 2019-11-03 17:50:34.000000000 +0000 +++ libdbix-runsql-perl-0.22/debian/copyright 2021-09-28 14:46:30.000000000 +0000 @@ -4,7 +4,7 @@ Upstream-Name: DBIx-RunSQL Files: * -Copyright: 2009-2018, Max Maischein +Copyright: 2009-2021, Max Maischein License: Artistic or GPL-1+ Files: debian/* diff -Nru libdbix-runsql-perl-0.21/debian/patches/auto-gitignore libdbix-runsql-perl-0.22/debian/patches/auto-gitignore --- libdbix-runsql-perl-0.21/debian/patches/auto-gitignore 1970-01-01 00:00:00.000000000 +0000 +++ libdbix-runsql-perl-0.22/debian/patches/auto-gitignore 2021-09-28 14:46:30.000000000 +0000 @@ -0,0 +1,23 @@ +Subject: Update .gitignore from Debian packaging branch + +The Debian packaging git branch contains these updates to the upstream +.gitignore file(s). This patch is autogenerated, to provide these +updates to users of the official Debian archive view of the package. + +[dgit (9.14) update-gitignore] +--- +diff --git a/.gitignore b/.gitignore +deleted file mode 100644 +index 901f2ad..0000000 +--- a/.gitignore ++++ /dev/null +@@ -1,8 +0,0 @@ +-db/ +-Makefile +-blib/ +-pm_to_blib +-MANIFEST.bak +-DBIx-RunSQL-* +-MYMETA.* +-.releaserc +\ No newline at end of file diff -Nru libdbix-runsql-perl-0.21/debian/patches/series libdbix-runsql-perl-0.22/debian/patches/series --- libdbix-runsql-perl-0.21/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ libdbix-runsql-perl-0.22/debian/patches/series 2021-09-28 14:46:30.000000000 +0000 @@ -0,0 +1,2 @@ + +auto-gitignore diff -Nru libdbix-runsql-perl-0.21/debian/upstream/metadata libdbix-runsql-perl-0.22/debian/upstream/metadata --- libdbix-runsql-perl-0.21/debian/upstream/metadata 2019-11-03 17:50:34.000000000 +0000 +++ libdbix-runsql-perl-0.22/debian/upstream/metadata 2021-09-28 14:46:30.000000000 +0000 @@ -1,3 +1,4 @@ +--- Archive: CPAN Bug-Database: https://rt.cpan.org/Public/Dist/Display.html?Name=DBIx-RunSQL Bug-Submit: bug-DBIx-RunSQL@rt.cpan.org diff -Nru libdbix-runsql-perl-0.21/lib/DBIx/RunSQL.pm libdbix-runsql-perl-0.22/lib/DBIx/RunSQL.pm --- libdbix-runsql-perl-0.21/lib/DBIx/RunSQL.pm 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/lib/DBIx/RunSQL.pm 2021-05-03 14:06:16.000000000 +0000 @@ -4,7 +4,7 @@ use DBI; use Module::Load 'load'; -our $VERSION = '0.21'; +our $VERSION = '0.22'; =head1 NAME @@ -23,6 +23,7 @@ sql => 'sql/create.sql', force => 1, verbose => 1, + formatter => 'Text::Table', ); # now run your tests with a DB setup fresh from setup.sql @@ -63,7 +64,7 @@ =item * -C, C, C - DBI parameters for connecting to the DB +C, C, C, C - DBI parameters for connecting to the DB =item * @@ -93,9 +94,11 @@ my ($self,%args) = @_; $args{sql} ||= 'sql/create.sql'; + $args{options} ||= {}; + my $dbh = delete $args{ dbh }; if (! $dbh) { - $dbh = DBI->connect($args{dsn}, $args{user}, $args{password}, {}) + $dbh = DBI->connect($args{dsn}, $args{user}, $args{password}, $args{options}) or die "Couldn't connect to DSN '$args{dsn}' : " . DBI->errstr; }; @@ -168,6 +171,10 @@ C - whether to output the (one) row and column, without any headers +=item * + +C - see the C<> option of C<< ->format_results >> + =back =cut @@ -243,6 +250,10 @@ C - whether to output the (one) row and column, without any headers +=item * + +C - see the C<> option of C<< ->format_results >> + =back =cut @@ -292,6 +303,9 @@ %args ); print $res; + # Set the exit code depending on the length of $res because + # we lost the information on how many rows the result + # set had ... $errors = length $res > 0; } elsif( $args{ output_string }) { @@ -383,7 +397,7 @@ eval { load $class; }; }; - + # Now dispatch according to the apparent type if( !$class->isa('Text::Table') and my $table = $class->can('table') ) { # Text::Table::Any interface @@ -685,15 +699,18 @@ L +L - SQLite setup/teardown for tests, mostly geared towards +testing, not general database setup + =head1 REPOSITORY The public repository of this module is -L. +L. =head1 SUPPORT The public support forum of this module is -L. +L. =head1 BUG TRACKER @@ -707,7 +724,7 @@ =head1 COPYRIGHT (c) -Copyright 2009-2018 by Max Maischein C. +Copyright 2009-2021 by Max Maischein C. =head1 LICENSE diff -Nru libdbix-runsql-perl-0.21/Makefile.PL libdbix-runsql-perl-0.22/Makefile.PL --- libdbix-runsql-perl-0.21/Makefile.PL 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/Makefile.PL 2021-05-03 14:06:16.000000000 +0000 @@ -1,7 +1,7 @@ # -*- mode: perl; c-basic-offset: 4; indent-tabs-mode: nil; -*- -#use 5.006; #weaken -use ExtUtils::MakeMaker; +use strict; +use ExtUtils::MakeMaker qw(WriteMakefile); # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. @@ -12,32 +12,46 @@ my $module = 'DBIx::RunSQL'; (my $main_file = "lib/$module.pm" ) =~ s!::!/!g; -(my $distname = $module) =~ s!::!-!g; +(my $distbase = $module) =~ s!::!-!g; +my $distlink = $distbase; my @tests = map { glob $_ } 't/*.t', 't/*/*.t'; my %module = ( - MIN_PERL_VERSION => '5.006', + NAME => $module, + AUTHOR => q{Max Maischein }, + VERSION_FROM => $main_file, + ABSTRACT_FROM => $main_file, META_MERGE => { "meta-spec" => { version => 2 }, resources => { repository => { - web => 'https://github.com/Corion/dbix--runsql', - url => 'git://github.com/Corion/dbix--runsql.git', + web => "https://github.com/Corion/$distlink", + url => "git://github.com/Corion/$distlink.git", type => 'git', }, bugtracker => { - web => 'http://rt.cpan.org/Public/Dist/Display.html?Name='.$distname, - mailto => $distname.'-bugs@rt.cpan.org', + web => 'https://rt.cpan.org/Public/Dist/Display.html?Name='.$distbase, + mailto => $distbase.'-bugs@rt.cpan.org', }, - license => ['http://dev.perl.org/licenses/'], + license => ['https://dev.perl.org/licenses/'], }, dynamic_config => 0, # we promise to keep META.* up-to-date x_static_install => 1, # we are pure Perl and don't do anything fancy }, - 'NAME' => $module, - 'LICENSE' => 'perl', - 'VERSION_FROM' => $main_file, # finds $VERSION + + MIN_PERL_VERSION => '5.006', + + 'EXE_FILES' => [ + 'bin/run-sql.pl', + ], + 'LICENSE'=> 'perl', + + PL_FILES => {}, + BUILD_REQUIRES => { + 'ExtUtils::MakeMaker' => 0, + }, + 'PREREQ_PM' => { 'strict' => 0, 'warnings' => 0, @@ -45,31 +59,34 @@ 'DBI' => 0, 'Module::Load' => 0, }, # e.g., Module::Name => 1.1 - 'EXE_FILES' => [ - 'bin/run-sql.pl', - ], - 'TEST_REQUIRES' => { + TEST_REQUIRES => { 'Test::More' => 0, 'Data::Dumper' => 0, }, - ABSTRACT_FROM => $main_file, # retrieve abstract from module - AUTHOR => 'Max Maischein ', + + dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, + clean => { FILES => "$distbase-*" }, + + test => { TESTS => join( ' ', @tests ) }, ); +# This is so that we can do +# require 'Makefile.PL' +# and then call get_module_info + sub get_module_info { %module } if( ! caller ) { # I should maybe use something like Shipwright... regen_README($main_file); - #regen_EXAMPLES(); + regen_EXAMPLES() if -d 'examples'; WriteMakefile1(get_module_info); }; +1; + sub WriteMakefile1 { #Written by Alexandr Ciornii, version 0.21. Added by eumm-upgrade. my %params=@_; - - regen_README( $params{VERSION_FROM} ); - my $eumm_version=$ExtUtils::MakeMaker::VERSION; $eumm_version=eval $eumm_version; die "EXTRA_META is deprecated" if exists $params{EXTRA_META}; @@ -79,6 +96,10 @@ $params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} }; delete $params{BUILD_REQUIRES}; } + if ($params{TEST_REQUIRES} and $eumm_version < 6.64) { + $params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{TEST_REQUIRES}} }; + delete $params{TEST_REQUIRES}; + } delete $params{CONFIGURE_REQUIRES} if $eumm_version < 6.52; delete $params{MIN_PERL_VERSION} if $eumm_version < 6.48; delete $params{META_MERGE} if $eumm_version < 6.46; @@ -99,7 +120,7 @@ my $readme = join "\n", pod_section($_[0], 'NAME', 'no heading' ), pod_section($_[0], 'DESCRIPTION' ), - <parse_from_file($_[0]); my $readme_mkdn = <as_markdown; -[![Build Status](https://travis-ci.org/Corion/App-scrape.svg?branch=master)](https://github.com/Corion/App-scrape) +[![Travis Build Status](https://travis-ci.org/Corion/$distlink.svg?branch=master)](https://travis-ci.org/Corion/$distlink) +[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/Corion/$distlink?branch=master&svg=true)](https://ci.appveyor.com/project/Corion/$distlink) STATUS update_file( 'README.mkdn', $readme_mkdn ); @@ -154,11 +180,12 @@ my @section = grep { /^=head1\s+$section/.../^=/ } <$fh>; - pop @section if $section[-1] =~ /^=/; - shift @section if $remove_heading; # Trim the section if( @section ) { + pop @section if $section[-1] =~ /^=/; + shift @section if $remove_heading; + pop @section while $section[-1] =~ /^\s*$/; shift @section @@ -169,6 +196,20 @@ return join "", @section; } +sub regen_EXAMPLES { + my $perl = $^X; + if ($perl =~/\s/) { + $perl = qq{"$perl"}; + }; + (my $example_file = $main_file) =~ s!\.pm$!/Examples.pm!; + my $examples = `$perl -w examples/gen_examples_pod.pl`; + if ($examples) { + warn "(Re)Creating $example_file\n"; + $examples =~ s/\r\n/\n/g; + update_file( $example_file, $examples ); + }; +}; + sub update_file { my( $filename, $new_content ) = @_; my $content; @@ -189,4 +230,4 @@ }; }; } -1; \ No newline at end of file +1; diff -Nru libdbix-runsql-perl-0.21/META.json libdbix-runsql-perl-0.22/META.json --- libdbix-runsql-perl-0.21/META.json 2019-03-09 13:15:39.000000000 +0000 +++ libdbix-runsql-perl-0.22/META.json 2021-05-03 14:06:18.000000000 +0000 @@ -4,13 +4,13 @@ "Max Maischein " ], "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150005", + "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" + "version" : 2 }, "name" : "DBIx-RunSQL", "no_index" : { @@ -51,18 +51,18 @@ "resources" : { "bugtracker" : { "mailto" : "DBIx-RunSQL-bugs@rt.cpan.org", - "web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=DBIx-RunSQL" + "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=DBIx-RunSQL" }, "license" : [ - "http://dev.perl.org/licenses/" + "https://dev.perl.org/licenses/" ], "repository" : { "type" : "git", - "url" : "git://github.com/Corion/dbix--runsql.git", - "web" : "https://github.com/Corion/dbix--runsql" + "url" : "git://github.com/Corion/DBIx-RunSQL.git", + "web" : "https://github.com/Corion/DBIx-RunSQL" } }, - "version" : "0.21", - "x_serialization_backend" : "JSON::PP version 2.27203", + "version" : "0.22", + "x_serialization_backend" : "JSON::PP version 2.97001", "x_static_install" : 1 } diff -Nru libdbix-runsql-perl-0.21/META.yml libdbix-runsql-perl-0.22/META.yml --- libdbix-runsql-perl-0.21/META.yml 2019-03-09 13:15:39.000000000 +0000 +++ libdbix-runsql-perl-0.22/META.yml 2021-05-03 14:06:18.000000000 +0000 @@ -9,7 +9,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150005' +generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -27,9 +27,9 @@ strict: '0' warnings: '0' resources: - bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=DBIx-RunSQL - license: http://dev.perl.org/licenses/ - repository: git://github.com/Corion/dbix--runsql.git -version: '0.21' + bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=DBIx-RunSQL + license: https://dev.perl.org/licenses/ + repository: git://github.com/Corion/DBIx-RunSQL.git +version: '0.22' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' x_static_install: 1 diff -Nru libdbix-runsql-perl-0.21/README libdbix-runsql-perl-0.22/README --- libdbix-runsql-perl-0.21/README 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/README 2021-05-03 14:06:16.000000000 +0000 @@ -11,7 +11,7 @@ cpan . cpanp -i . -Consult http://www.cpan.org/modules/INSTALL.html for further instruction. +Consult https://www.cpan.org/modules/INSTALL.html for further instruction. Should you wish to install this module manually, the procedure is perl Makefile.PL @@ -23,12 +23,14 @@ REPOSITORY The public repository of this module is -L. +L. SUPPORT The public support forum of this module is -L. +L. + + BUG TRACKER @@ -36,6 +38,14 @@ L or via mail to L. + +SEE ALSO + +L + +L - SQLite setup/teardown for tests, mostly geared towards +testing, not general database setup + AUTHOR Max Maischein C @@ -46,4 +56,4 @@ COPYRIGHT (c) -Copyright 2009-2018 by Max Maischein C. +Copyright 2009-2021 by Max Maischein C. diff -Nru libdbix-runsql-perl-0.21/README.mkdn libdbix-runsql-perl-0.22/README.mkdn --- libdbix-runsql-perl-0.21/README.mkdn 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/README.mkdn 2021-05-03 14:06:16.000000000 +0000 @@ -1,5 +1,6 @@ -[![Build Status](https://travis-ci.org/Corion/App-scrape.svg?branch=master)](https://github.com/Corion/App-scrape) +[![Travis Build Status](https://travis-ci.org/Corion/DBIx-RunSQL.svg?branch=master)](https://travis-ci.org/Corion/DBIx-RunSQL) +[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/Corion/DBIx-RunSQL?branch=master&svg=true)](https://ci.appveyor.com/project/Corion/DBIx-RunSQL) # NAME @@ -16,6 +17,7 @@ sql => 'sql/create.sql', force => 1, verbose => 1, + formatter => 'Text::Table', ); # now run your tests with a DB setup fresh from setup.sql @@ -50,7 +52,7 @@ sql => \"update mytable set foo='bar';", -- `dsn`, `user`, `password` - DBI parameters for connecting to the DB +- `dsn`, `user`, `password`, `options` - DBI parameters for connecting to the DB - `dbh` - a premade database handle to be used instead of `dsn` - `force` - continue even if errors are encountered - `verbose` - print each SQL statement as it is run @@ -90,6 +92,7 @@ - `output_string` - whether to output the (one) row and column, without any headers +- `formatter` - see the ` option of `->format_results` ## `DBIx::RunSQL->run_sql ARGS` @@ -119,6 +122,7 @@ but a row was found. - `output_string` - whether to output the (one) row and column, without any headers +- `formatter` - see the ` option of `->format_results` ## `DBIx::RunSQL->format_results %options` @@ -327,15 +331,18 @@ [ORLite::Migrate](https://metacpan.org/pod/ORLite::Migrate) +[Test::SQLite](https://metacpan.org/pod/Test::SQLite) - SQLite setup/teardown for tests, mostly geared towards +testing, not general database setup + # REPOSITORY The public repository of this module is -[http://github.com/Corion/DBIx--RunSQL](http://github.com/Corion/DBIx--RunSQL). +[https://github.com/Corion/DBIx--RunSQL](https://github.com/Corion/DBIx--RunSQL). # SUPPORT The public support forum of this module is -[http://perlmonks.org/](http://perlmonks.org/). +[https://perlmonks.org/](https://perlmonks.org/). # BUG TRACKER @@ -349,7 +356,7 @@ # COPYRIGHT (c) -Copyright 2009-2018 by Max Maischein `corion@cpan.org`. +Copyright 2009-2021 by Max Maischein `corion@cpan.org`. # LICENSE diff -Nru libdbix-runsql-perl-0.21/t/00-use.t libdbix-runsql-perl-0.22/t/00-use.t --- libdbix-runsql-perl-0.21/t/00-use.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/t/00-use.t 2021-05-03 14:06:16.000000000 +0000 @@ -1,5 +1,5 @@ -#!perl -w -use strict; -use Test::More tests => 1; - +#!perl -w +use strict; +use Test::More tests => 1; + use_ok 'DBIx::RunSQL'; \ No newline at end of file diff -Nru libdbix-runsql-perl-0.21/t/01-force.t libdbix-runsql-perl-0.22/t/01-force.t --- libdbix-runsql-perl-0.21/t/01-force.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/t/01-force.t 2021-05-03 14:06:16.000000000 +0000 @@ -1,41 +1,41 @@ -#!perl -w -use strict; -use Test::More; - -use DBIx::RunSQL; - -my $can_run = eval { - require DBD::SQLite; - 1 -}; - -if (not $can_run) { - plan skip_all => "SQLite not installed"; -} - -plan tests => 5; -my $warn; -local $SIG{__WARN__} = sub { $warn = shift }; -my $lives = eval { - my $test_dbh = DBIx::RunSQL->create( - dsn => 'dbi:SQLite:dbname=:memory:', - sql => $0, - ); - 1; -}; -my $err = $@; -ok !$lives, "We die on invalid SQL"; -isn't $@, '', "We die with some error message"; - -$lives = eval { - my $test_dbh = DBIx::RunSQL->create( - dsn => 'dbi:SQLite:dbname=:memory:', - sql => $0, - force => 1, - ); - 1; -}; -$err = $@; -ok $lives, "We can force invalid SQL"; -is $@, '', "We don't die with some error message"; -like $warn, qr/SQL ERROR/, "We still warn about SQL errors"; +#!perl -w +use strict; +use Test::More; + +use DBIx::RunSQL; + +my $can_run = eval { + require DBD::SQLite; + 1 +}; + +if (not $can_run) { + plan skip_all => "SQLite not installed"; +} + +plan tests => 5; +my $warn; +local $SIG{__WARN__} = sub { $warn = shift }; +my $lives = eval { + my $test_dbh = DBIx::RunSQL->create( + dsn => 'dbi:SQLite:dbname=:memory:', + sql => $0, + ); + 1; +}; +my $err = $@; +ok !$lives, "We die on invalid SQL"; +isn't $@, '', "We die with some error message"; + +$lives = eval { + my $test_dbh = DBIx::RunSQL->create( + dsn => 'dbi:SQLite:dbname=:memory:', + sql => $0, + force => 1, + ); + 1; +}; +$err = $@; +ok $lives, "We can force invalid SQL"; +is $@, '', "We don't die with some error message"; +like $warn, qr/SQL ERROR/, "We still warn about SQL errors"; diff -Nru libdbix-runsql-perl-0.21/t/02-trigger.t libdbix-runsql-perl-0.22/t/02-trigger.t --- libdbix-runsql-perl-0.21/t/02-trigger.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/t/02-trigger.t 2021-05-03 14:06:16.000000000 +0000 @@ -1,28 +1,28 @@ -#!perl -w -use strict; -use Test::More; - -use DBIx::RunSQL; - -my $can_run = eval { - require DBD::SQLite; - 1 -}; - -if (not $can_run) { - plan skip_all => "SQLite not installed"; -} - -plan tests => 1; -my $lives = eval { - my $test_dbh = DBIx::RunSQL->create( - dsn => 'dbi:SQLite:dbname=:memory:', - sql => 't/trigger.sql', - #verbose => 1, - ); - 1; -}; -my $err = $@; -ok $lives, "We can parse triggers" - or diag $err; - +#!perl -w +use strict; +use Test::More; + +use DBIx::RunSQL; + +my $can_run = eval { + require DBD::SQLite; + 1 +}; + +if (not $can_run) { + plan skip_all => "SQLite not installed"; +} + +plan tests => 1; +my $lives = eval { + my $test_dbh = DBIx::RunSQL->create( + dsn => 'dbi:SQLite:dbname=:memory:', + sql => 't/trigger.sql', + #verbose => 1, + ); + 1; +}; +my $err = $@; +ok $lives, "We can parse triggers" + or diag $err; + diff -Nru libdbix-runsql-perl-0.21/t/03-comment.t libdbix-runsql-perl-0.22/t/03-comment.t --- libdbix-runsql-perl-0.21/t/03-comment.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/t/03-comment.t 2021-05-03 14:06:16.000000000 +0000 @@ -1,26 +1,26 @@ -#!perl -w -use strict; -use Test::More; - -use DBIx::RunSQL; - -my $can_run = eval { - require DBD::SQLite; - 1 -}; - -if (not $can_run) { - plan skip_all => "SQLite not installed"; -} - -plan tests => 2; -my @statements; -my $test_dbh = DBIx::RunSQL->create( - dsn => 'dbi:SQLite:dbname=:memory:', - sql => 't/trigger.sql', - verbose_handler => sub { push @statements, $_[0] }, - verbose => 1, -); - -unlike $statements[0], qr/commented-out/, "Commented out things that look like statements get filtered"; -like $statements[0], qr/-- SECRET PRAGMA #foo/, "Comments survive parsing"; +#!perl -w +use strict; +use Test::More; + +use DBIx::RunSQL; + +my $can_run = eval { + require DBD::SQLite; + 1 +}; + +if (not $can_run) { + plan skip_all => "SQLite not installed"; +} + +plan tests => 2; +my @statements; +my $test_dbh = DBIx::RunSQL->create( + dsn => 'dbi:SQLite:dbname=:memory:', + sql => 't/trigger.sql', + verbose_handler => sub { push @statements, $_[0] }, + verbose => 1, +); + +unlike $statements[0], qr/commented-out/, "Commented out things that look like statements get filtered"; +like $statements[0], qr/-- SECRET PRAGMA #foo/, "Comments survive parsing"; diff -Nru libdbix-runsql-perl-0.21/t/04-handle-parameters.t libdbix-runsql-perl-0.22/t/04-handle-parameters.t --- libdbix-runsql-perl-0.21/t/04-handle-parameters.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/t/04-handle-parameters.t 2021-05-03 14:06:16.000000000 +0000 @@ -1,65 +1,76 @@ -#!perl -w -use strict; -use Test::More tests => 7; - -use DBIx::RunSQL; -use Data::Dumper; - -my @received; -{ - no warnings 'redefine'; - sub DBIx::RunSQL::create { - @received= @_; - }; -}; - -DBIx::RunSQL->handle_command_line( - "my-test-app", -); -my ($package,%options)= @received; -is $options{ dsn }, "dbi:SQLite:dbname=db/my-test-app.sqlite", "DSN gets appname used as default"; - -DBIx::RunSQL->handle_command_line( - "my-test-app", - ['--dsn' => 'dbi:Magic:'], -); -($package,%options)= @received; - -is $options{ dsn }, "dbi:Magic:", "DSN gets passed through"; - -# Test the invocation styles for SQL -DBIx::RunSQL->handle_command_line( - "my-test-app", - ['--sql' => 'sql 1', "some more stuff that's ignored"], -); -($package,%options)= @received; - -is ${$options{ sql }}, "sql 1", "Explicit SQL gets returned"; - -DBIx::RunSQL->handle_command_line( - "my-test-app", - ['--', 'sql 2 on command line'], -); -($package,%options)= @received; - -is ${$options{ sql }}, "sql 2 on command line", "SQL on the command line gets returned"; - - -{ open *STDIN, '<', \'sql from STDIN'; -DBIx::RunSQL->handle_command_line( - "my-test-app", - ['--'], -); -($package,%options)= @received; -}; -ok !$options{ sql }, "We got no SQL string"; -ok $options{ fh }, "We'll read sql from STDIN"; - -{ open *STDIN, '<', \'sql from STDIN 2'; -DBIx::RunSQL->handle_command_line( - "my-test-app", - ['--', "some SQL"], -); -($package,%options)= @received; -}; -is ${$options{ sql }}, "some SQL", "We don't read from STDIN if we get other stuff"; +#!perl -w +use strict; +use Test::More tests => 7; + +use DBIx::RunSQL; +use Data::Dumper; + +my $have_scalar_open = eval { + require 5.008; # for scalar open + require DBD::SQLite; + 1; +}; + +my @received; +{ + no warnings 'redefine'; + sub DBIx::RunSQL::create { + @received= @_; + }; +}; + +DBIx::RunSQL->handle_command_line( + "my-test-app", +); +my ($package,%options)= @received; +is $options{ dsn }, "dbi:SQLite:dbname=db/my-test-app.sqlite", "DSN gets appname used as default"; + +DBIx::RunSQL->handle_command_line( + "my-test-app", + ['--dsn' => 'dbi:Magic:'], +); +($package,%options)= @received; + +is $options{ dsn }, "dbi:Magic:", "DSN gets passed through"; + +# Test the invocation styles for SQL +DBIx::RunSQL->handle_command_line( + "my-test-app", + ['--sql' => 'sql 1', "some more stuff that's ignored"], +); +($package,%options)= @received; + +is ${$options{ sql }}, "sql 1", "Explicit SQL gets returned"; + +DBIx::RunSQL->handle_command_line( + "my-test-app", + ['--', 'sql 2 on command line'], +); +($package,%options)= @received; + +is ${$options{ sql }}, "sql 2 on command line", "SQL on the command line gets returned"; + + +SKIP: { + if( ! $have_scalar_open ) { + skip "No scalar open on this version of Perl", 3; + }; + { open *STDIN, '<', \'sql from STDIN'; + DBIx::RunSQL->handle_command_line( + "my-test-app", + ['--'], + ); + ($package,%options)= @received; + }; + ok !$options{ sql }, "We got no SQL string"; + ok $options{ fh }, "We'll read sql from STDIN"; + + { open *STDIN, '<', \'sql from STDIN 2'; + DBIx::RunSQL->handle_command_line( + "my-test-app", + ['--', "some SQL"], + ); + ($package,%options)= @received; + }; + is ${$options{ sql }}, "some SQL", "We don't read from STDIN if we get other stuff"; +}; diff -Nru libdbix-runsql-perl-0.21/t/05-output-bool.t libdbix-runsql-perl-0.22/t/05-output-bool.t --- libdbix-runsql-perl-0.21/t/05-output-bool.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/t/05-output-bool.t 2021-05-03 14:06:16.000000000 +0000 @@ -1,37 +1,39 @@ -#!perl -w -use strict; -use Test::More; - -use DBIx::RunSQL; -use Data::Dumper; - -# Test against a "real" database if we have one: -if( ! eval { require DBD::SQLite; 1 }) { - plan skip_all => $@; - exit; -}; - -plan tests => 1; - -# Redirect STDOUT to a variable -close STDOUT; # sssh -open STDOUT, '>', \my $output; - -my $exitcode = DBIx::RunSQL->handle_command_line( - "my-test-app", - [ - '--bool', - '--dsn' => 'dbi:SQLite:dbname=:memory:', - '--sql' => <<'SQL', - create table foo (bar integer, baz varchar); - insert into foo (bar,baz) values (1,'hello'); - insert into foo (bar,baz) values (2,'world'); - select * from foo; -SQL - ] -); - -is $exitcode, 1, "We get a nonzero exit code if a row gets selected with --bool" - or diag $output; - +#!perl -w +use strict; +use Test::More; + +use DBIx::RunSQL; +use Data::Dumper; + +# Test against a "real" database if we have one: +if( ! eval { require DBD::SQLite; + require 5.008; # for scalar open + 1; }) { + plan skip_all => $@; + exit; +}; + +plan tests => 1; + +# Redirect STDOUT to a variable +close STDOUT; # shhh +open STDOUT, '>', \my $output; + +my $exitcode = DBIx::RunSQL->handle_command_line( + "my-test-app", + [ + '--bool', + '--dsn' => 'dbi:SQLite:dbname=:memory:', + '--sql' => <<'SQL', + create table foo (bar integer, baz varchar); + insert into foo (bar,baz) values (1,'hello'); + insert into foo (bar,baz) values (2,'world'); + select * from foo; +SQL + ] +); + +is $exitcode, 1, "We get a nonzero exit code if a row gets selected with --bool" + or diag $output; + done_testing(); \ No newline at end of file diff -Nru libdbix-runsql-perl-0.21/t/05-select.t libdbix-runsql-perl-0.22/t/05-select.t --- libdbix-runsql-perl-0.21/t/05-select.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/t/05-select.t 2021-05-03 14:06:16.000000000 +0000 @@ -1,53 +1,53 @@ -#!perl -w -use strict; -use Test::More; - -use DBIx::RunSQL; - -my $can_run = eval { - require DBD::SQLite; - 1 -}; - -if (not $can_run) { - plan skip_all => "SQLite not installed"; - exit; -} - -plan tests => 6; - -my $sql= <<'SQL'; - create table foo ( - name varchar(64) - , age decimal(4) - ); - insert into foo (name,age) values ('bar',100); - insert into foo (name,age) values ('baz',1); - insert into foo (name,age) values ('Some loong string',1000); -SQL - -my $test_dbh = DBIx::RunSQL->create( - dsn => 'dbi:SQLite:dbname=:memory:', - sql => \$sql, -); - -my $sth= $test_dbh->prepare(<<'SQL'); - select * from foo; -SQL -$sth->execute; -my $result= DBIx::RunSQL->format_results( sth => $sth ); - -isn't $result, undef, "We got some kind of result"; -like $result, qr/\bname\b.*?\bage\b/m, "Things that look like 'name' and 'age' appear in the string"; -like $result, qr/\bbar\b.*?\b100\b/m, "Things that look like 'bar' and '100' appear in the string"; - - $sth= $test_dbh->prepare(<<'SQL'); - select * from foo where 1=0; -SQL -$sth->execute; -$result= DBIx::RunSQL->format_results( sth => $sth ); - -isn't $result, undef, "We got some kind of result"; -like $result, qr/\bname\b.*?\bage\b/m, "An empty resultset still outputs the column titles"; -unlike $result, qr/\bbar\b.*?\b100\b/m, "(but obviously, no values)"; - +#!perl -w +use strict; +use Test::More; + +use DBIx::RunSQL; + +my $can_run = eval { + require DBD::SQLite; + 1 +}; + +if (not $can_run) { + plan skip_all => "SQLite not installed"; + exit; +} + +plan tests => 6; + +my $sql= <<'SQL'; + create table foo ( + name varchar(64) + , age decimal(4) + ); + insert into foo (name,age) values ('bar',100); + insert into foo (name,age) values ('baz',1); + insert into foo (name,age) values ('Some loong string',1000); +SQL + +my $test_dbh = DBIx::RunSQL->create( + dsn => 'dbi:SQLite:dbname=:memory:', + sql => \$sql, +); + +my $sth= $test_dbh->prepare(<<'SQL'); + select * from foo; +SQL +$sth->execute; +my $result= DBIx::RunSQL->format_results( sth => $sth ); + +isn't $result, undef, "We got some kind of result"; +like $result, qr/\bname\b.*?\bage\b/m, "Things that look like 'name' and 'age' appear in the string"; +like $result, qr/\bbar\b.*?\b100\b/m, "Things that look like 'bar' and '100' appear in the string"; + + $sth= $test_dbh->prepare(<<'SQL'); + select * from foo where 1=0; +SQL +$sth->execute; +$result= DBIx::RunSQL->format_results( sth => $sth ); + +isn't $result, undef, "We got some kind of result"; +like $result, qr/\bname\b.*?\bage\b/m, "An empty resultset still outputs the column titles"; +unlike $result, qr/\bbar\b.*?\b100\b/m, "(but obviously, no values)"; + diff -Nru libdbix-runsql-perl-0.21/t/06-quiet.t libdbix-runsql-perl-0.22/t/06-quiet.t --- libdbix-runsql-perl-0.21/t/06-quiet.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/t/06-quiet.t 2021-05-03 14:06:16.000000000 +0000 @@ -1,52 +1,54 @@ -#!perl -w -use strict; -use Test::More; - -use DBIx::RunSQL; -use Data::Dumper; - -# Test against a "real" database if we have one: -if( ! eval { require DBD::SQLite; 1 }) { - plan skip_all => $@; - exit; -}; - -plan tests => 2; - -# Redirect STDOUT to a variable -close STDOUT; # sssh -open STDOUT, '>', \my $output; - -my $exitcode = DBIx::RunSQL->handle_command_line( - "my-test-app", - [ - '--quiet', - '--dsn' => 'dbi:SQLite:dbname=:memory:', - '--sql' => <<'SQL', - create table foo (bar integer, baz varchar); - insert into foo (bar,baz) values (1,'hello'); - insert into foo (bar,baz) values (2,'world'); - select * from foo; -SQL - ] -); - -isn't $output, '', "We get output if rows are found"; - -$output = ''; -$exitcode = DBIx::RunSQL->handle_command_line( - "my-test-app", - [ - '--quiet', - '--dsn' => 'dbi:SQLite:dbname=:memory:', - '--sql' => <<'SQL', - create table foo (bar integer, baz varchar); - insert into foo (bar,baz) values (1,'hello'); - insert into foo (bar,baz) values (2,'world'); - select * from foo where 1=0; -SQL - ] -); -is $output, '', "We get no output if no rows are found"; - +#!perl -w +use strict; +use Test::More; + +use DBIx::RunSQL; +use Data::Dumper; + +# Test against a "real" database if we have one: +if( ! eval { require DBD::SQLite; + require 5.008; # for scalar open + 1; }) { + plan skip_all => $@; + exit; +}; + +plan tests => 2; + +# Redirect STDOUT to a variable +close STDOUT; # sssh +open STDOUT, '>', \my $output; + +my $exitcode = DBIx::RunSQL->handle_command_line( + "my-test-app", + [ + '--quiet', + '--dsn' => 'dbi:SQLite:dbname=:memory:', + '--sql' => <<'SQL', + create table foo (bar integer, baz varchar); + insert into foo (bar,baz) values (1,'hello'); + insert into foo (bar,baz) values (2,'world'); + select * from foo; +SQL + ] +); + +isn't $output, '', "We get output if rows are found"; + +$output = ''; +$exitcode = DBIx::RunSQL->handle_command_line( + "my-test-app", + [ + '--quiet', + '--dsn' => 'dbi:SQLite:dbname=:memory:', + '--sql' => <<'SQL', + create table foo (bar integer, baz varchar); + insert into foo (bar,baz) values (1,'hello'); + insert into foo (bar,baz) values (2,'world'); + select * from foo where 1=0; +SQL + ] +); +is $output, '', "We get no output if no rows are found"; + done_testing(); \ No newline at end of file diff -Nru libdbix-runsql-perl-0.21/t/rt115442.t libdbix-runsql-perl-0.22/t/rt115442.t --- libdbix-runsql-perl-0.21/t/rt115442.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/t/rt115442.t 2021-05-03 14:06:16.000000000 +0000 @@ -1,16 +1,16 @@ -#!perl -w -use strict; -use Test::More; -use Data::Dumper; - -use DBIx::RunSQL; - -plan tests => 1; -my @statements = DBIx::RunSQL->split_sql(<<'SQL'); -DROP TABLE IF EXISTS player1; -DROP TABLE IF EXISTS player2; - -SQL - -is scalar( @statements ), 2, "Trailing whitespace is allowed in statements" - or diag Dumper \@statements; +#!perl -w +use strict; +use Test::More; +use Data::Dumper; + +use DBIx::RunSQL; + +plan tests => 1; +my @statements = DBIx::RunSQL->split_sql(<<'SQL'); +DROP TABLE IF EXISTS player1; +DROP TABLE IF EXISTS player2; + +SQL + +is scalar( @statements ), 2, "Trailing whitespace is allowed in statements" + or diag Dumper \@statements; diff -Nru libdbix-runsql-perl-0.21/t/rt77378.t libdbix-runsql-perl-0.22/t/rt77378.t --- libdbix-runsql-perl-0.21/t/rt77378.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/t/rt77378.t 2021-05-03 14:06:16.000000000 +0000 @@ -1,29 +1,29 @@ -#!perl -w -use strict; -use Test::More; - -use DBIx::RunSQL; - -my $can_run = eval { - require DBD::SQLite; - 1 -}; - -if (not $can_run) { - plan skip_all => "SQLite not installed"; -} - -plan tests => 1; - -my $dsn = 'dbi:SQLite:dbname=:memory:'; - -my $lives = eval { - DBIx::RunSQL->create( - verbose => 0, - dsn => $dsn, - sql => 't/rt77378.sql', - ); - 1 -}; -ok $lives, "We can parse triggers (RT 77378)" +#!perl -w +use strict; +use Test::More; + +use DBIx::RunSQL; + +my $can_run = eval { + require DBD::SQLite; + 1 +}; + +if (not $can_run) { + plan skip_all => "SQLite not installed"; +} + +plan tests => 1; + +my $dsn = 'dbi:SQLite:dbname=:memory:'; + +my $lives = eval { + DBIx::RunSQL->create( + verbose => 0, + dsn => $dsn, + sql => 't/rt77378.sql', + ); + 1 +}; +ok $lives, "We can parse triggers (RT 77378)" or diag $@; \ No newline at end of file diff -Nru libdbix-runsql-perl-0.21/xt/99-compile.t libdbix-runsql-perl-0.22/xt/99-compile.t --- libdbix-runsql-perl-0.21/xt/99-compile.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/xt/99-compile.t 2021-05-03 14:06:16.000000000 +0000 @@ -1,5 +1,4 @@ -#!perl -w - +#!perl use warnings; use strict; use File::Find; @@ -20,14 +19,15 @@ return if (! m{(\.pm|\.pl) \z}xmsi); my ($stdout, $stderr, $exit) = capture(sub { - system( $^X, '-Mblib', '-wc', $_ ); + system( $^X, '-Mblib', '-c', $_ ); }); s!\s*\z!! for ($stdout, $stderr); if( $exit ) { - diag $exit; + diag $stderr; + diag "Exit code: ", $exit; fail($_); } elsif( $stderr ne "$_ syntax OK") { diag $stderr; diff -Nru libdbix-runsql-perl-0.21/xt/99-manifest.t libdbix-runsql-perl-0.22/xt/99-manifest.t --- libdbix-runsql-perl-0.21/xt/99-manifest.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/xt/99-manifest.t 2021-05-03 14:06:16.000000000 +0000 @@ -9,6 +9,7 @@ my @files = qw( MANIFEST MANIFEST.SKIP ); plan tests => scalar @files * 4 +1 # MANIFEST existence check + +1 # MYMETA.* non-existence check ; for my $file (@files) { @@ -24,6 +25,9 @@ chomp @lines; is_deeply([grep { s/\s.*//; ! -f } @lines], [], "All files in $file exist") or do { diag "$_ is mentioned in $file but doesn't exist on disk" for grep { ! -f } @lines }; + + # Exclude some files from shipping + is_deeply([grep(/^MYMETA\.(yml|json)$/, @lines)],[],"We don't try to ship MYMETA.* $file"); }; close F; diff -Nru libdbix-runsql-perl-0.21/xt/99-synopsis.t libdbix-runsql-perl-0.22/xt/99-synopsis.t --- libdbix-runsql-perl-0.21/xt/99-synopsis.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/xt/99-synopsis.t 2021-05-03 14:06:16.000000000 +0000 @@ -20,7 +20,8 @@ } sub wanted { - push @files, $File::Find::name if /\.p(l|m|od)$/; + push @files, $File::Find::name if /\.p(l|m|od)$/ + and $_ !~ /\bDSL\.pm$/; # we skip that one as it initializes immediately } sub synopsis_file_ok { diff -Nru libdbix-runsql-perl-0.21/xt/99-test-prerequisites.t libdbix-runsql-perl-0.22/xt/99-test-prerequisites.t --- libdbix-runsql-perl-0.21/xt/99-test-prerequisites.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/xt/99-test-prerequisites.t 2021-05-03 14:06:16.000000000 +0000 @@ -18,7 +18,7 @@ BEGIN { eval { - require CPAN::META::Prereqs; + require CPAN::Meta::Prereqs; require Parse::CPAN::Meta; require Perl::PrereqScanner::Lite; require Module::CoreList; @@ -35,24 +35,35 @@ }; }; -my @tests = glob 't/*.t'; +my @tests; +if( @ARGV ) { + @tests = @ARGV; +} else { + @tests = grep { -f $_ } map { glob $_ } 't/*.t', 'scripts/*' +} plan tests => 0+@tests; my $meta = Parse::CPAN::Meta->load_file('META.json'); # Find what META.* declares my $explicit_test_prereqs = CPAN::Meta::Prereqs->new( $meta->{prereqs} )->merged_requirements->as_string_hash; -my $minimum_perl = $meta->{prereqs}->{runtime}->{perl} || 5.006; +my $minimum_perl = $meta->{prereqs}->{runtime}->{requires}->{perl} || 5.006; + +sub distributed_packages { + my @modules; + for( @_ ) { + dir($_)->recurse( callback => sub { + my( $child ) = @_; + if( !$child->is_dir and $child =~ /\.pm$/) { + push @modules, ((scalar $child->slurp()) =~ m/^\s*package\s+(?:#.*?\n\s+)*(\w+(?:::\w+)*)\b/msg); + } + }); + }; + map { $_ => $_ } @modules; +} # Find what we distribute: -my @modules; -dir('blib')->recurse( callback => sub { - my( $child ) = @_; - if( !$child->is_dir and $child =~ /\.pm$/) { - push @modules, ((scalar $child->slurp()) =~ m/^\s*package\s+(\w+(?:::\w+)*)\b/msg); - } -}); -my %distribution = map { $_ => $_ } @modules; +my %distribution = distributed_packages('blib','t'); my $scanner = Perl::PrereqScanner::Lite->new; for my $test_file (@tests) { @@ -68,29 +79,29 @@ } else { #diag "$p is not in core for $minimum_perl"; }; - + # remove explicit (test) prerequisites for my $k (keys %$explicit_test_prereqs) { delete $missing{ $k }; }; #warn Dumper $explicit_test_prereqs->as_string_hash; - + # Remove stuff from our distribution for my $k (keys %distribution) { delete $missing{ $k }; }; } - + # If we have no apparent missing prerequisites, we're good my @missing = sort keys %missing; - + # Rerun the test without these modules and see whether it crashes my @failed; for my $candidate (@missing) { - #diag "Checking that $candidate is not essential"; + diag "Checking that $candidate is not essential"; my @cmd = ($^X, "-MTest::Without::Module=$candidate", "-Mblib", '-w', $test_file); my $cmd = join " ", @cmd; - + my ($stdout, $stderr, $exit) = capture { system( @cmd ); }; diff -Nru libdbix-runsql-perl-0.21/xt/99-unix-text.t libdbix-runsql-perl-0.22/xt/99-unix-text.t --- libdbix-runsql-perl-0.21/xt/99-unix-text.t 2019-03-09 13:15:33.000000000 +0000 +++ libdbix-runsql-perl-0.22/xt/99-unix-text.t 2021-05-03 14:06:16.000000000 +0000 @@ -7,7 +7,7 @@ use File::Find; use strict; -my @files; +my @files = ('Makefile.PL', 'MANIFEST', 'MANIFEST.SKIP', glob 't/*.t'); my $blib = File::Spec->catfile(qw(blib lib)); find(\&wanted, grep { -d } ($blib, 'bin'));