I'm working with my coding partner remotely on a module we're developing. Its a CGI::App based web interface.

We're using CGI::Application::Plugin::Config::Simple to read in configuration data, including a definition for library, where our respective sandboxes are stored.

Its loading the cpan installed modules already in @INC, just fine. But its tripping up on this piece of it:

# cgiapp_init(); sub cgiapp_init { my $self = shift; $self->config_file('/var/lib/cf/tbd/regform/Registration.ini'); my $lib = $self->config_param('library'); use lib qw/$lib/; use Registration::WWW::htmlgui; use Registration::DB; my $dbh = Registration::DB->connect($self->config_param('db_engine') +,$self->config_param('host_name'),$self- >config_param('db_name'),$self->config_param('db_user'),$self->config_ +param('db_pw')); my $result = auth_config($dbh); }
At which point it throws these ugly errors, reading:

Use of uninitialized value in string at Registration/lib/Registration/ +WWW/RegForm.pm line 46. Empty compile time value given to use lib at Registration/lib/Registra +tion/WWW/RegForm.pm line 46
Apparently it wants to be able to do its use lib piece at compile time, but it doesn't get populated from the configuration until run time. Can anyone here suggest a work-around, please?

All help appreciated.

-- Hugh


In reply to Which comes first . . . by hesco

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.