Bug#765125: libembperl-perl: FTBFS: Tests failures

Axel Beckert abe at debian.org
Wed Oct 15 23:46:05 UTC 2014


Control: tag -1 + upstream

Hi,

some more details:

Axel Beckert wrote:
> gregor herrmann wrote:
> > It builds with CGI.pm 3.x from perl core but not if I add
> > libcgi-pm-perl as a build dependency.
> 
> The line causing the failure is
> 
> do { $cgiok = $CGI::VERSION > 2.45 ; @info = sort keys %{$fdat{-upload}} ; $cgiok?"@info":'Content-Disposition Content-Type' }
> 
> In both cases $cgiok should be true:
> 
> → perl -MCGI -E 'say $CGI::VERSION'
> 4.06
> → perl -I/usr/share/perl/5.20.1 -MCGI -E 'say $CGI::VERSION'
> 3.65
> 
> So the difference is the amount of meta data in the $fdat{-upload}
> hashref (which is likely generated by CGI.pm).

The actual difference is the following (expected pattern may include
regular expressions):

+++ test/tmp/out.htm    2014-10-16 01:21:07.288697841 +0200
@@ -3,17 +3,15 @@
 <head>
 <title>Embperl Tests - File-Upload</title>
 </head>
-
 <h1>Embperl Tests - File-Upload</h1>
 
-Content-Disposition Content-Type
-^Filename:       \d*upload-filename<br>
-Content-Type:  test/plain<br>
-^CGI-Version
-^cgiok           
-filehandle:     Fh
-Info:          Content-Disposition = form-data; name="upload"; filename="12upload-filename"
-Content-Type = test/plain
+
+Filename:       12upload-filename<br>
+Content-Type:  <br>
+CGI-Version:    4.06
+cgiok           1
+filehandle:    CGI::File::Temp
+Info:
 no:   1
 size: 2048
 no:   2
@@ -27,7 +25,7 @@
 buflen:         8219
 Your file has the content
 ----------
-f1=abc1
+f1=abc1
[...]

> It seems as if CGI 3.65 outputs the very same values which the
> fallback test outputs if no CGI.pm at all is available, while CGI 4.x
> seems to have more keys in there, unexpected by the test.

Actually it does not have more keys in there but less -- namely none.
And this again doesn't look as good anymore.

Actually the whole %fdat now only contains this:

$VAR1 = {
          'content' => 'Hi there!',
          'multval' => 'A   B       C',
          'single' => 'S',
          'upload' => bless( \*{'File::Temp::$fh'}, 'CGI::File::Temp' )
        };

This is likely related to these CGI.pm changes in 4.04:

    - this release removes some long deprecated modules/functions and
      includes refactoring to the temporary file handling in CGI.pm. if
      you are doing anything out of the ordinary with regards to temp
      files you should test your code before deploying this update as
      temp files may no longer be stored in previously used locations

    [...]

    - test case for RT #55166 - calling Vars to get the filename does not return
      a filehandle, so this cannot be used in the call to uploadinfo, also
      update documentation for the uploadInfo to show that ->Vars should not be
      used to get the filename for this method
    [...]
    - add procedural call tests for upload and uploadInfo to confirm these work
      as should (RT #91136)

Then again this error happened while testing Embperl's mod_perl
backend, not in the CGI one... But IIRC file upload handling in
Embperl are generally outsourced to CGI.pm...

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5



More information about the pkg-perl-maintainers mailing list