Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A question about using CGI.pm

Status
Not open for further replies.

lcs01

Programmer
Aug 2, 2006
182
US
I have been using CGI.pm for quite some time now. I often found the html code rendered by CGI.pm unreadable. For instance:

Code:
table(tr(..),tr(..),...,tr(..));

The above code can create a very, very long html code. Is there a way to insert line breaks while calling CGI.pm's subroutines, so that the html code becomes more readable?
 
Thank you very much, Kevin!

Unfortunately, my company is still using Perl 5.6 (sigh!!). So I tried to install CGI::pretty on one of our dev servers. The following is the output of 'make test' (first run):

Code:
[b]% make test[/b]
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/apache................ok
t/can...................ok
t/carp..................ok
t/cookie................ok
t/fast..................ok
        7/7 skipped: FCGI not installed, cannot continue

So I then installed FCGI-0.67 and everything went smoothly. Here is the 2nd run of 'make test' on CGI::pretty:

Code:
[b]% make test[/b]
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/apache................ok
t/can...................ok
t/carp..................ok
t/cookie................ok
t/fast..................ok
t/form..................ok
t/function..............ok
t/html..................ok
t/no_tabindex...........ok
t/pretty................ok
t/push..................ok
        1/12 skipped: do_sleep() test may take a while
t/request...............ok
t/start_end_asterisk....ok
t/start_end_end.........ok
t/start_end_start.......ok
t/switch................ok
t/upload................ok 2/0#     Failed test (t/upload.t at line 74)
t/upload................ok 3/0#     Structures begin differing at:
#          $got->[0] = goodbye_world.txt
#     $expected->[0] = 'goodbye_world.txt'
t/upload................ok 15/0# Looks like you failed 1 tests of 15.
t/upload................dubious
        Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 4
        Failed 1/15 tests, 93.33% okay
t/uploadInfo............ok
t/util-58...............skipped
        all skipped: no reason given
t/util..................ok
Failed Test Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/upload.t     1   256    15    1   6.67%  4
1 test and 1 subtest skipped.
Failed 1/20 test scripts, 95.00% okay. 1/517 subtests failed, 99.81% okay.
make: *** [test_dynamic] Error 11

What's next? Please help. Many thanks!
 
Is it really trying to upload something? Do you need to configure the test to really do a upload or is it even going to work in a corporate setting? Trying just finishing the install and see how the module works.

99.81% is still an A :D
 
To travs69, I think it is testing whether all the library subroutines are ok. In my case, it seems to me that there is an error in upload() subroutine?

Thank you for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top