On Sunday, July 14, 2002, at 08:03 , Daniel Gardner wrote: > Drieux wrote: [..] >> this sounds way strange... >> >> could you provide us with illustrative code here. > > I presume what the OP meant was that the module has an import() subroutine > which perhaps messes about with namespaces and fails if it's dependencies > are not met.
That could be the issue, since it is one of my ongoing concerns about both 'convoluting' the relationships of perl modules as merely stacks of functions, and badly formed inheritence hierachies - both lead to a place where one gets stuck down the line trying to get one simple 'function' out of the lot. So as a Religious Advocate of 'we will most likely get to the need to do a perl module of these ....' It is useful to have illustrations of how 'not' to get there... Some of my 'less than best' illustrations are safely on tape, somewheres.... So it would be useful, educational, etc, to understand what chris had actually bumped into... > I may be wrong, but you might be interested to read up on the differences > between "require" and "use" - what use actually does and when. It's quite > enlightening. Oh trust me, I have played some of the sick games one has to do to provide the all in one piece of code that is all singing and all dancing hence one winds up making subs to put 'requires' into, that are hide the functionality that one can ONLY use in specific contexts: eg: sub dtk_our_init { .... require 'lyrislib.pl'; &lyris::init; .... } Given that the "lyrislib.pl" "perl library" resides only on the $LYRIS_HOST - I only visit that function, when I know that I am executing on that host, eg: dtk_our_init if ( $host eq $LYRIS_HOST); So since that code needs to function as 'front end' on other hosts - it would 'fail' with the unable to find lyrislib.pl were we to do the stock form of #!/usr/bin/perl -w use strict; .... require lyrislib.pl .... rinse, lather, repeat for PM's that are only installed on some of the hosts.... That being the case, I have considered that sort of strategy for perl modules as well - but haven't quite had the heart to think about going there..... ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]