> I have learned recently(and the original poster as well) that despite two
> files having different file names, and doing a "require
> /full/path/to/file.pl", modperl will only compile the file once because
they
> both have the same package name.

No, I don't think that's correct.  Perl will compile both files if they have
different paths and you specify the full path.  However, if they do have the
same package name, the second one will overwrite the first one, which is
probably not what you intended.

> I have yet to find a solution to the problem that I like... I have a file
> that contains the database information (username, password, db name,
connect
> functions, ect) and for a while I couldnt figure out why two scripts using
> two seperate files for database info would connect to the wrong database
> heh.

There are tons of solutions for having separate config files for two
scripts.  You could name the config files differently and call the right one
from each script.  You could use a path relative to the current directory in
your require statement.  You could one conf file with one big hash of
configuration that is keyed on a variable you set with PerlSetVar to
something different for each script.

- Perrin

Reply via email to