Just for kicks I have tried "using" the module as well to no effect

I presume that means the module loaded ok. (Please correct me if that's wrong.)

Should it not be blowing at the die line below it?

There's no "die" in the snippet of code (lines 35 to 43) that you've given.
Update: but there is a "die" at the next line (line 44) - and that's where the script is, in fact, dying.
However, because, $err ends with a newline, you don't get the "at line 44" in relation to the die.
The "at line 39" is where the error occurred - not where the script died.
If you chomp $err; before you die($err); you should see what I mean.

I can't put my finger on the reason for the "Can't locate Apache::Session::Postgres" error. Perhaps related to some permissions problem ?
I seem to recall that there have been occasions where "Can't locate" should really have been "Can't load" - because the module was actually located ok, but could not be loaded (because of permissions issues).

What does the following command output:
perl -MApache::Session::Postgres -le 'print "@INC";'
Cheers,
Rob

In reply to Re: failure to require an installed module + eval fails to trap? by syphilis
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.