Discussion:
[Refdb-devel] [ refdb-Bugs-1761035 ] tests fails ...
SourceForge.net
2007-07-26 12:50:16 UTC
Permalink
Bugs item #1761035, was opened at 2007-07-26 14:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=385991&aid=1761035&group_id=26091

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Perl modules
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: steletch (steletch)
Assigned to: Markus Hoenicka (mhoenicka)
Summary: tests fails ...

Initial Comment:
It seems the test have not been updated from the module, please see :

RefDB-perlmod-1.2]$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
1..10: ok
2..10: ok
3..10: ok
4..10: ok
5..10: Undefined subroutine &RefDB::CGI::is_cgi called at test.pl line 151.

In fact, there is no is_cgi function in the CGI.pm module, only check_cgi is available.

Furthermore, it seems the CGI.pm module still contains header description for the is_cgi method (although not available anymore).

Last, the documentation in CGI.pm states:
" ## Returns: 0 if CGI app called appropriately, 0 if not" (line 94)

I assume the return code is not always 0. In fact, from the code, it should be stated:
" ## Returns: 0 if CGI app called appropriately, 3 if not"

The test.pl should be modified to use the '3' as a return value instead of 0:
## check_cgi() should return 3 if test.pl is run from the command line
if (RefDB::CGI::check_cgi() == 3) {
(lines 150 and 151 of test.pl, notice the is_cgi is changed for check_cgi and the return value is 3 instead of 0).

There are also other problems (for instance Log.pm expect ERR not err as in the test.pl script) that lead to the error message:
6..10: Can't use string ("ee") as a HASH ref while "strict refs" in use at blib/lib/RefDB/Log.pm line 260.

But i've not enough time to provide a complete patch record, you now have some pointers :-)

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=385991&aid=1761035&group_id=26091
SourceForge.net
2007-07-26 22:08:47 UTC
Permalink
Bugs item #1761035, was opened at 2007-07-26 14:50
Message generated for change (Comment added) made by mhoenicka
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=385991&aid=1761035&group_id=26091

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Perl modules
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: steletch (steletch)
Assigned to: Markus Hoenicka (mhoenicka)
Summary: tests fails ...

Initial Comment:
It seems the test have not been updated from the module, please see :

RefDB-perlmod-1.2]$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
1..10: ok
2..10: ok
3..10: ok
4..10: ok
5..10: Undefined subroutine &RefDB::CGI::is_cgi called at test.pl line 151.

In fact, there is no is_cgi function in the CGI.pm module, only check_cgi is available.

Furthermore, it seems the CGI.pm module still contains header description for the is_cgi method (although not available anymore).

Last, the documentation in CGI.pm states:
" ## Returns: 0 if CGI app called appropriately, 0 if not" (line 94)

I assume the return code is not always 0. In fact, from the code, it should be stated:
" ## Returns: 0 if CGI app called appropriately, 3 if not"

The test.pl should be modified to use the '3' as a return value instead of 0:
## check_cgi() should return 3 if test.pl is run from the command line
if (RefDB::CGI::check_cgi() == 3) {
(lines 150 and 151 of test.pl, notice the is_cgi is changed for check_cgi and the return value is 3 instead of 0).

There are also other problems (for instance Log.pm expect ERR not err as in the test.pl script) that lead to the error message:
6..10: Can't use string ("ee") as a HASH ref while "strict refs" in use at blib/lib/RefDB/Log.pm line 260.

But i've not enough time to provide a complete patch record, you now have some pointers :-)

----------------------------------------------------------------------
Comment By: Markus Hoenicka (mhoenicka)
Date: 2007-07-27 00:08

Message:
Logged In: YES
user_id=85809
Originator: NO

the bugs mentioned above were fixed by updating CGI.pm and test.pl in
revision 420.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=385991&aid=1761035&group_id=26091
Loading...