Skip Menu |

This queue is for tickets about the SQL-Shell CPAN distribution.

Report information
The Basics
Id: 129670
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: SQL-Shell

People
Owner: MGUALDRON [...] cpan.org
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.16
Fixed in: 1.17



Subject: Optional t/SQL-Shell.t tests fail if CGI and Locale::Recode are not installed
When performing t/SQL-Shell.t against an SQLite database, three tests fail: $ UNIT_TEST_DSN=DBI:SQLite:dbname=test.db UNIT_TEST_USER=anything UNIT_TEST_PASS='' perl -Ilib t/SQL-Shell.t 1..58 [...] ok 28 (logging) not ok 29 at line 136 in t/SQL-Shell.t (XML display mode) ok 30 (Show schema) ok 31 (Send command) ok 32 (Recv command) ok 33 (Wipe tables) not ok 34 at line 163 in t/SQL-Shell.t (Check for unrecognised charset) not ok 35 at line 166 in t/SQL-Shell.t (Loaded data with recoding) ok 36 (Escape whitespace) When debugging the "XML display mode" test, I can see the $output variable contains: Can't locate CGI.pm in @INC (you may need to install the CGI module) (@INC contains: ./lib ../lib lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ../lib/SQL/Shell.pm line 858. And indeed lib/SQL/Shell.pm:858 requires CGI: sub _render_xml { my ($self, $fh, $headers, $data) = @_; → require CGI; #For its markup escaping routine print $fh "<rowset>\n"; I believe SQL-Shell metadata should list CGI as a run-time dependency. A similar issue is with the "Check for unrecognised charset" test. Locale::Recode is missing.
Hi, Thank you for bringing this to my attention. I have added both CGI, and Locale::Recode as prerequisites for SQL::Shell, and released v1.17 with this fix in place. On Fri May 24 02:19:13 2019, ppisar wrote: Show quoted text
> When performing t/SQL-Shell.t against an SQLite database, three tests > fail: > > $ UNIT_TEST_DSN=DBI:SQLite:dbname=test.db UNIT_TEST_USER=anything > UNIT_TEST_PASS='' perl -Ilib t/SQL-Shell.t > 1..58 > [...] > ok 28 (logging) > not ok 29 at line 136 in t/SQL-Shell.t (XML display mode) > ok 30 (Show schema) > ok 31 (Send command) > ok 32 (Recv command) > ok 33 (Wipe tables) > not ok 34 at line 163 in t/SQL-Shell.t (Check for unrecognised > charset) > not ok 35 at line 166 in t/SQL-Shell.t (Loaded data with recoding) > ok 36 (Escape whitespace) > > When debugging the "XML display mode" test, I can see the $output > variable contains: > > Can't locate CGI.pm in @INC (you may need to install the CGI module) > (@INC contains: ./lib ../lib lib /usr/local/lib64/perl5 > /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl > /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at > ../lib/SQL/Shell.pm line 858. > > And indeed lib/SQL/Shell.pm:858 requires CGI: > > sub _render_xml > { > my ($self, $fh, $headers, $data) = @_; > → require CGI; #For its markup escaping routine > print $fh "<rowset>\n"; > > I believe SQL-Shell metadata should list CGI as a run-time dependency. > > A similar issue is with the "Check for unrecognised charset" test. > Locale::Recode is missing.