Matthew Berk <[EMAIL PROTECTED]> writes:

> Apologies in advance for the conceptual nature of this inquiry.
>
> I have two chunks of code that are being run as separate scripts under
> Registry. Both are using require() (I know, I know) to pull in a
> library of subroutines. 

If you're abusing require() as a means of adding external
subroutines directly into your script, then that's not 
going to work with Registry.  One thing that works, I think,
would be to use a package declaration at the start of the library, 
and change the script to call those subroutines by their 
package-qualified names:

                old lib: sub foo {} ...
                new lib: package Foo; sub foo{} ...
             old script: require $mylib; foo(4); ...
             new script: require $mylib; Foo::foo(4); ...

This may not be the best solution, but I'm sure this issue is well 
documented somewhere on the perl.apache.org site.

-- 
Joe Schaefer

Reply via email to