Arshavir Grigorian wrote:
Hi,

I am wondering if anyone has experience with a framework for
dynamically loading certain modules into an application and executing
certain code based on whether a certain module is loaded (available or
not). By "dynamically", I do not mean loading run-time, only being
able to safely exclude certain modules at startup. One place this
could come in handy is when selling an app to 2 clients of whom one
has purchased all the functionality and the other has not, and you
don't want to give them certain module(s). I am guessing one could
accomplish this by using a macro processor (m4) to preprocess Perl
code before it's "released", but it would probably be somewhat
painful.
Actually I dont' think the m4 idea is so bad, you could probably just have it 
stub out the packages
package A;
1;

and change your code to do ::can() or ->can() as appropriate.

I can't think of another way, that will keep the "conditional" code shared for 
those that bought it all.





--
------------------------------------------------------------------------
Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /
 / /|_/ / // /\ \/ /_/ / /__
/_/  /_/\_, /___/\___\_\___/
       <___/

Reply via email to