Perhaps I've misunderstood your question, but perhaps it might work if you created instances of the generic handler class, with the configuration file passed as an argument to the constructor. Then you'd only be use the generic class once, and creating a differently configured handler instance to do the work for each vhost. This reworking should be fairly painless if you're already using method handlers. So, for each host you might have something like the following in startup.pl:

# startup1.pl use GenericModule; $My::VirtualHost_1_Handler = GenericModule->new( 'config' => '/path/to/lib/Project1Config1/param.pm' );

Then in your VirtualHost section:

PerlRequire '/path/to/startup1.pl' SetHandler perl-script PerlHandler $My::VirtualHost_1_Handler->handle

Then all you'd need to add would be some code to your generic class's new method that reads in the configuration variables and sets them as attributes of the specific instances. Each virtual host could then have one or more separate handler object instances, each with its own private configuration variables held as object attributes.

HTH
ViceRaid


In reply to Re: Re: Re: how mod_perl finds if code has already been compiled by ViceRaid
in thread how mod_perl finds if code has already been compiled by Sihal

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.