Okay, trying again now that I have more info. I've search the site, but found no posts that relate to calling a Perl script that only contains functions that are needed in the PHP scripts.
I am in the process of re-writing some perl scripts in PHP. We are trying to write any new development, when possible, in PHP. There are so many changes to the process that I figured it would be now considered new development and so am doing the rewrite in PHP.
The problem is that there are a "boat load" of project unique functions written as Perl Modules that I need to use. Existing Perl scripts are still using them so need to stay as it at this time. These Perl scripts are not in the cgi-bin but in a lib folder at the same level as the cgi-bin and htdocs folders and of course have a .pm extension.
I tried several things. If I just do an include_once or require_once, I get the actual script dumped to the html. So, that won't work.
If I try virtual/B I get an error message:
Warning: virtual() [function.virtual]: Unable to include '/path/lib/project/lib.pm' - request execution failed in /path/htdocs/project/index.php on line 12
If I try something like exec/B, I don't get an error message on line 12 anymore, but on the first call to a subroutine inside my lib.pm file.
Fatal error: Call to undefined function check_status() in /path/htdocs/project/index.php on line 31
I've also looked at CPAN for help and tried this:
$script_name = "/path/lib/project/lib.pm";
$perl = Perl::getInstance();
$file = $script_name;
$instance = $perl->new('IO::File', "<$file");
to no avail.
Any ideas on how to resolve this?