I believe that other monks have helped you, but still if you will face the problem of using libA.pm routines in libB.pm and viceversa, (you have to read perlmod, perlmodlib, and 'intermediate perl' book for some reference) for that you need to properly define the reusable routines in the appropriate modules,
when it comes to calling routines, you can have another module Objects.pm which maintains the objects of the other two modules(liba and libb) and this objects.pm will be used to share the objects variable to across libA and libB, so that the calling becomes easy.
Some hints for Objects.pm and example code is below
# register object in objects.pm sub RegisterObject { my ($Pack,$Object,$Tag) = @_; my ($Name); $Name = uc($Tag) . 'OBJ'; $Pack->{'Objects'}->{$Name}->[0] = $Object; $Pack->{'Objects'}->{$Name}->[1] = $Tag; print STDERR "Registered Object $Tag with Objects Handler\n"; } # autoload in object.pm sub AUTOLOAD { my ($Pack) = shift; my ($Type,$Calledas,$Key,$Name); if (ref($Pack)) { $Type = ref($Pack); } else { print STDERR "$Pack is not an Object\n"; exit(1); } $Calledas = $AUTOLOAD; $Calledas =~ s/.*://; foreach $Key (keys(%{$Pack->{'Objects'}})) { if ($Pack->{'Objects'}->{$Key}->[1] eq $Calledas) { return($Pack->{'Objects'}->{$Key}->[0]); } } print STDERR "%%%%%%% Unregistered Object - AUTOLOAD Called as $Ca +lledas %%%%%%%%\n"; return(-1); } # from your main script register the objects of liba and libb. # the $main::Objects must be the object of Objects.pm. $main::Objects->RegisterObject($BlessedObjectRef, $ObjectName); # you have to pass $main::Objects to liba and libb during object creat +ion(probable in new()) # from there on your liba can use libb routines like $main::Objects->liba->routineX() # which will call autoload and retrieve the object of liba and call th +e routineX. # the same can be used in libb.
I believe that I haven't confused you, the above is just an example, I hope it will help you
I have been using the above Objects.pm technique for years.
It is helping me to manage multiple module's objects and calling routines among themselves.

In reply to Re: Redefined subroutines in multiple libraries by targetsmart
in thread Redefined subroutines in multiple libraries by James Board

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.