[Catalyst] script/myapp_server -r Can't exec "/usr/bin/perl" every 3 or 4 restarts

Matt S Trout dbix-class at trout.me.uk
Tue Apr 28 19:53:12 GMT 2009


On Mon, Apr 27, 2009 at 12:45:29PM +0100, Mike Glen wrote:
> Matt S Trout wrote:
> >On Thu, Apr 23, 2009 at 09:51:59AM +0100, Mike Glen wrote:
> >  
> >>I think it might be due to line 335 in HTTP.pm
> >>335         $ENV{PERL5LIB} .= join $Config{path_sep}, @INC;
> >>    
> >
> >Hmm. That's to try and make sure -I calls on the original perl invocation
> >get included. I guess what you need to do is try something like -
> >
> >my %already;
> >@already{split(quotemeta($Config{path_sep}), $ENV{PERL5LIB})} = 1;
> >
> >$ENV{PERL5LIB} .= join $Config{path_sep}, grep !$already{$_} @INC;
> >
> >or so.
> >
> >Fancy having a play and seeing if you can come up with a patch for us?
> >
> >  
> I have played around with this for a while and have made some progress.
> What seems to be happening is that with every restart @INC is increasing 
> in size.
> New directory paths are being added
> These are being created by appending the following to each existing path
> /i386-linux-thread-multi
> /5.8.5
> /5.8.4
> /5.8.3
> /5.8.2
> /5.8.1
> /5.8.0
> 
> Each of these new paths are unique so no obvious way I can see to filter 
> them out
> And finding out why @INC is being added to in this way is beyond the 
> scope of my current knowledge.

Let me guess. Red Hat? They do "clever" things like that.

Two possibilities:

(1) exec a $^X to print @INC to get the "normal" @INC

(2) use $Config{arch} and /^5.\/ to strip off the extra ones.

Thoughts?

-- 
      Matt S Trout       Catalyst and DBIx::Class consultancy with a clue:
   Technical Director        http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Any questions? Mail mst <at> shadowcat.co.uk
My blog: http://www.shadowcat.co.uk/blog/matt-s-trout/ (warning: profanity)



More information about the Catalyst mailing list