The output of:
perl -MApache::Session::Postgres -le 'print "@INC"' /opt/m42c/managed/opt/perl/5.8.9/lib/5.8.9/x86_64-linux /opt/m42c/mana +ged/opt/perl/5.8.9/lib/5.8.9 /opt/m42c/managed/opt/perl/5.8.9/lib/sit +e_perl/5.8.9/x86_64-linux /opt/m42c/managed/opt/perl/5.8.9/lib/site_p +erl/5.8.9 .

As I would expect. Also, using <% Dumper(\@INC) %> from inside of a mason component yeilds the same result; (Since Environments can change).

Permissions are not the issue, as the webserver runs as the same user as the module installer, (The whole kit is frameworked into /opt/m42c to isolate everything from any system dependencies. This makes things pretty portable, as long as everything is installed in the same place on a different machine. I'm sure you guys have seen this approach many many times.

Also, I am aware of "require" being far different from "use" and that its use is special.

And switching to "use" actually does not load the module at all, in fact, it wont even pass tests with use, complaining that $sessionClass has not been declared:

[amps@autotech M42C-Web]$ make test PERL_DL_NONLAZY=1 "/opt/m42c/managed/opt/perl/5.8.9/bin/perl5.8.9" "-M +ExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness:: +Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/M42C-Web.t .. Failed 1/1 subtests Test Summary Report ------------------- t/M42C-Web.t (Wstat: 11 Tests: 0 Failed: 0) Non-zero wait status: 11 Parse errors: Bad plan. You planned 1 tests but ran 0. Files=1, Tests=0, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.04 cusr + 0.02 csys = 0.09 CPU) Result: FAIL Failed 1/1 test programs. 0/0 subtests failed. make: *** [test_dynamic] Error 255
But that isn't why I chose to use require. I am simply not importing anythi

ng from Apache::Session::Postgres, why would I not require it? Even still the error I get from "using" the Module is concerning at best. (The line containing the import() was not originally there, and I was just testing something quick.).

You were correct though, chomp($@) placed the blame on the offending line. - I don't eval {} often from within a module, I tend to do that at the GUI level.

Also worth noting that installing the module anyway, despite failing make test, throws a seg fault when it's used.


In reply to Re^2: failure to require an installed module + eval fails to trap? by Keep
in thread failure to require an installed module + eval fails to trap? by Keep

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.