Subject: | 'make test' fails when $HEADERS_ONCE of CGI.pm globals modified |
Hi.
A generic failure occurs when 'make test' is performed. Three tests fail:
t/basic.....................1/110
# Failed test 'base class response (header match)'
# at t/basic.t line 26.
.
.<HTML output snippage>
.
# doesn't match '(?-xism:^Content-Type: text/html)'
Use of uninitialized value in pattern match (m//) at t/basic.t line 27.
# Failed test 'base class response (body match)'
# at t/basic.t line 27.
# undef
# doesn't match '(?-xism:Query Environment:)'
# Looks like you failed 2 tests of 110.
t/basic..................... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/110 subtests
.
.
.
t/header_props..............1/6
# Failed test 'headed added via hashref arg to header_add'
# at t/header_props.t line 59.
.
.<HTML output snippage>
.
# doesn't match '(?mi-xs:^Expires: )'
# Looks like you failed 1 test of 6.
t/header_props.............. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/6 subtests
.
.
The server information follows though the issue, as noted, is generic:
Distribution: CGI-Application-4.10 and lower until -4.06
Perl: 5.8.x
OS: Linux 2.6.9-67.0.15.ELsmp
It would appear that if one changes a particular global setting in
CGI.pm that the headers generated by the CGI-Application test suite,
specifically 't/basic.t' and 't/header_props.t', either are not produced
or do not match what the test expects during a regex check.
If HTTP headers are configured as '$HEADERS_ONCE = 1;' under the
subroutine 'initialize_globals', then the 'make test' for
CGI-Application fails. If HTTP headers are configured as '$HEADERS_ONCE
= 0;', which is the default CGI.pm setting upon CGI install, then the
CGI-Application install succeeds. Default installs of CGI.pm will not
introduce this bug, so most users will not experience this 'make' error
when CGI-Application is subsequently installed. However, for those who
have modified CGI.pm's globals, this workaround will help one to add
CGI-Application to their module repository.
I hope this helps and thanks for maintaining CGI-Application.
TS