Much ugliness! Really could have used better description of the problem, especially where it concerns the other module dependencies. The best I can do is through some psuedo code at you to hopefully get you thinking in a good direction

Basically you need a BEGIN loop to handle your dependencies. The following is real bulky and I have no doubts there are more efficient ways to do this, but I'm just trying to show 'a way' to get you started and it's strictly the first way to come to my head.

/usr/local/bin/perl -w use strict; BEGIN { # I'd put all the locations I want added into an array my @inINC = "/pathsToTheModulesIWant"; # I'd load all the current values into a different array my @initINC = "/defaultINCPaths"; # Then I'd have an array with all the values I want # pulled from @INC my @badINC = "/modules I don't want"; # (With the problems with interdependencies you may need # to move some modules to there own directory ) # I'd then loop through the initial array and load the # paths I want to keep my $initPath, $badINCPath; for $initPath (@initINC) { for $badINC (@badINC) { unless ( $badINC eq $initPath ); { push (@inINC, $initPath); } } } # Now that you have the order and values of the # paths you want, set @INC @INC = @inINC; } # and On with the programs regularly scheduled execution use x; use y;

Hope this or the criticism arising from this helps!


In reply to Re: problem with module loading by coreolyn
in thread problem with module loading by karthikpa

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.