Take a look at Crypt::License on CPAN. I used it a couple years back to do exactly what you are trying to do. It encrypts your Perl source code and then decrypts it on the fly. There is a slight overhead for the decryption, but if running under mod_perl, that should be negligible since it would only need to decrypt on apache startup.
Just be aware that if perl sees the decrypted code, the user can see it too. It's not trivial but certainly doable, for example while running under perl debugger. I wonder why Crypt::License docs don't include any warning. Or do I miss something? I haven't tried this particular module, but all the previous discussions about similar modules had the conclusion that you can really hide the code, other than making it harder to get to it.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com