Re: contention for require()'d code library

[prev] [thread] [next] [Date index for 2005/02/10]

From: Perrin Harkins
Subject: Re: contention for require()'d code library
Date: 17:09 on 10 Feb 2005
On Thu, 2005-02-10 at 12:01 -0500, Matthew Berk wrote:
> I have come up with a bit of a hackish, near term solution. Wanted to 
> share it with the group.
> 
>   - check to see if a subroutine in the library is defined()
>   - if not, delete() the library name from %INC
>   - require() the library

I do something like that when porting legacy code in a hurry.  I use a
do('library.pl') inside a BEGIN block, so that it ignores %INC but only
happens once per script.

You definitely want to fix this in the long-term though.  Duplicating
these subs in multiple scripts eats up memory.

- Perrin

(message missing)

contention for require()'d code library
Matthew Berk 16:28 on 08 Feb 2005

Re: contention for require()'d code library
Perrin Harkins 16:34 on 08 Feb 2005

Re: contention for require()'d code library
Joe Schaefer 16:52 on 08 Feb 2005

Re: contention for require()'d code library
Matthew Berk 17:01 on 10 Feb 2005

Re: contention for require()'d code library
Perrin Harkins 17:09 on 10 Feb 2005

Generated at 11:21 on 20 Feb 2005 by mariachi v0.52