prodevel has asked for the wisdom of the Perl Monks concerning the following question:

I'm getting failures on my CGI.pm-2.68 installation.

Sorry 4 the wrapping.

# /usr/ccs/bin/make test
PERL_DL_NONLAZY=1 /usr/bin/perl -I./blib/arch -I./blib/lib -I/usr/local/lib/perl5/sun4-solaris/5.003
-I/usr/local/lib/perl5 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/form..............Can't locate constant.pm in @INC at blib/lib/CGI.pm line 28.
BEGIN failed--compilation aborted at blib/lib/CGI.pm line 29.
BEGIN failed--compilation aborted at t/form.t line 9.
FAILED tests 1-17
Failed 17/17 tests, 0.00% okay
Test returned status 2 (wstat 512)
t/function..........Can't locate constant.pm in @INC at blib/lib/CGI.pm line 28.
BEGIN failed--compilation aborted at blib/lib/CGI.pm line 29.
BEGIN failed--compilation aborted at t/function.t line 10.
FAILED tests 1-27
Failed 27/27 tests, 0.00% okay
Test returned status 2 (wstat 512)
t/html..............Can't locate constant.pm in @INC at
blib/lib/CGI.pm line 28.

Somehow I suspect this is a fairly common set of errors (I've only included
the first 2 of 5), and I'm extremely appreciative of any input.
PS - Solaris 2.5.1, cheesey SPARC 1.

Many thanks,

Uncle Bob

Replies are listed 'Best First'.
Re: New to installing mods
by mwp (Hermit) on Aug 03, 2000 at 11:24 UTC

    Looks to me like you're simply missing the 'constant' module. Go and grab it from the same place you got CGI.pm :)

    However, it may be a little more complex than that. The reason I say this is because you seem to be missing some directories from your include path (all those -I parameters). It seems like constant would be a part of the standard Perl distribution, no?

    What I would recommend to you is to reinstall Perl. Remove the old Perl first, if you can (not manually, but with a make uninstall or package manager--I'm not familiar with Solaris at all). Then grab 5.6.0 (or 5.004_05 if you are faint of heart) and compile it up. When that's through, run the following at the prompt:

    % perl -MCPAN -e shell

    This will fire up an online package manager program, not unlike ActivePerl's PPM. Work your way through the configuration (or hit "no" when it asks you if you're ready for a manual configuration and it will set itself up automatically) and type '?' at the prompt to see a list of commands. Type 'install Bundle::CPAN' to update the CPAN distribution, then 'reload CPAN' to reload the program, then 'install CGI' to get back on course. It should handle everything for you.

    (Some of the old timers around here will trout me for recommending a reinstall, that the problem should be tracked down and fixed and not simply overwritten. This is a Good Thing, but in the interest of saving the both of us time and frustration, I suggest you just start from scratch. :) The nice thing about doing it this way is that it should repair any broken paths, and you will get the CPAN package manager, the sun will shine, birds will sing... you get the picture.)

    Good luck!

    Alakaboo

RE: New to installing mods (feel your pain)
by ybiC (Prior) on Aug 03, 2000 at 16:03 UTC
    I went through similar grief recently.   This thread is how fellow Monks helped me find a solution.
        cheers,
        ybiC
Re: New to installing mods
by merlyn (Sage) on Aug 03, 2000 at 16:57 UTC
    Agreed. If constant is missing, you either have a really old (CERT-ifiably buggy with security holes) Perl, or a broken installation. Both of which will cause you much grief eventually.

    Reinstall.

    -- Randal L. Schwartz, Perl hacker