That was part of the problem, Perrin: there were no error messages. Turns out that this is what's happening:
The required file does, in fact, execute, so that's NOT the problem. It's a separate problem that manifests itself when using the -x file test. The included/do()'ed file contains an array of commands and an array of paths -- BTW, I'm working with cvsweb (http://www.freebsd.org/projects/cvsweb.html) -- and there's code in there that finds a valid full path like this: $cmd = 'enscript'; $full_path{$cmd} = search_path( $cmd); sub search_path($) { my ($command) = @_; for my $d (@command_path) { my $cmd = catfile( $d, $command ); return $cmd if ( -x $cmd && !-d _ ); } return ''; } The really weird thing is that when run in a CGI context, the -x test works as expected, but when called when running as a mod_perl2 registry script, it returns false, even though the file (that does exist) is executable by everyone. Change it back to CGI (not mod_perl) and the same code does work properly. Sorry for the confusion about the actual cause of the problem. Eric > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Perrin Harkins > Sent: Friday, August 29, 2008 12:46 PM > To: Berg, Eric > Cc: Sean Davis; Jeff Pang; modperl perl apache org > Subject: Re: a require problem > > On Fri, Aug 29, 2008 at 10:53 AM, Berg, Eric > <[EMAIL PROTECTED]> wrote: > > Just yesterday I ran into a problem in which using do( > $file ) or eval( > > $file ) both had problems in that they did not successfully > execute the > > code in $file. > > What were the error messages from do and eval? > > > Folks, is there some kind of setting for mod_perl2 that > affects this, or > > a different way to accomplish this? > > It doesn't sound like any issue I've heard of, but it's really hard to > say without the error message. > > - Perrin > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. -------- IRS Circular 230 Disclosure: Please be advised that any discussion of U.S. tax matters contained within this communication (including any attachments) is not intended or written to be used and cannot be used for the purpose of (i) avoiding U.S. tax related penalties or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.