in reply to Accessing Perl Modules Through .htaccess

The user/group running the Apache, in your case as httpd.conf configured, daemon, must have a read access to the Pork.pm. It means that not only Pork.pm must have permission of 'r' for daemon, but also all parts in the path hieararchy enable daemon to "walktrough" to eventually read Pork.pm. This means at least the 'x' bit must be turned on for daemon.

Out of all.... You don't really need all that noise lines you now comment on. If you use PERL5LIB, perl automatically includes that in @INC. There's no point to untaint PERL5LIB either, because it will be ignored by perl in -T (taint mode), anyway. If you don't trust yourself, why didn't you put -T explicitly and see how's it going? And "use strict;", and "use warnings;".

However, if you insist to parse a lib path, assumming you really trust the source, this simple snip will do:

BEGIN { # $custom_path: you may obtain this global somewhere # outside of your code. You really need to reverse? unshift @INC, reverse split /:/, $custom_path; }
eval "use something;" just never works.