chris,

if you have the time, this problem interests me.

On Sunday, July 14, 2002, at 12:59 , chris wrote:

> "Require" works on the top level package but the thing is so nested I
> will end up with errors at the next level.

is this a set of packages that you are marking?
or inherited from someone??? Or is this the
classic CPAN issue that package A requires
package B,C,D -

and one sees at the top of the package

        package A;
        use B;
        use C qw/:std/;
        use D;

and you only need a function that is completely 'local'
to only package A - and have not yet installed packages
B,C,D - which were 'requirements'?????

[..]
>
> 3. use fully qualified package name
>
> Option 3 works best but I have to comment out some code that I do not
> need in the package and its dependencies.

[..]

this is what leads me to my interest since you can pull
the trick off with

        package A;
        #use B;
        #use C qw/:std/;
        #use D;

so that you will not have to go through the 'use' time evaluation
that you have B,C,D packages and hence can cheat around with

        my $got_answer = A::neat_function(@arglist);

If this is your set of packages - and you are in the 'development
phase' - there are other tricks you can play with here - such as
the 'use lib' variations.

When i was playing around with the DTK::Net::Web and DTK::Net::DI704
modules I found it simpler to have the 'rack and stack' of

        use lib "/Users/drieux/perl/DTK/Net/blib/lib";
        use lib "/Users/drieux/perl/DTK/Net/Web/blib/lib";
        use lib "/Users/drieux/perl/DTK/Net/DI704/blib/lib";
        use lib "$ENV{HOME}/lib/perl";

in the basic test code - since that would be where I would
'find' the *.pm files after running the top level make....

run the test code - if it worked, procede to the next round
of development - new test code - maybe it did not work,
say 'crude things', fix bug in test code or appropriate module
run the make... run the test....

ciao
drieux

http://www.wetware.com/drieux/pbl/

--------------

This space left intentionally blank.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to