Click to See Complete Forum and Search --> : Do we have seperate compiled files in perl ?


ankitmathur
06-18-2007, 10:38 AM
Hi Everybody,

I am new to perl so am asking you all a very basic question.

Do we get to have a compiled file in perl just like java?

What I mean is whether we get to have a compiled file for our .PL files like we get to have .CLASS compiled files in JAVA.

If yes, I'd appreciate if somebody could guide me about how to get it. I have a .PL file which is running smoothly but to make sure of its portability & hiding the code I want to know if something like a compiled file is also there.


Thanks
Ankit

Nedals
06-19-2007, 08:30 PM
Do we get to have a compiled file in perl just like java?
Typically No.
There are ways to compile Perl but its is fairly easy to decompile, so why bother.

ankitmathur
06-20-2007, 08:38 AM
Hi Nedals,

Thanks for your time.

I'm working as a junior developer & my seniors have instructed me to get it compiled. So you see I have to.

I've tried using perl2exe. While it compiles successfully when I try running the compiled file I get this error message.


install_driver(mysql) failed:
PLEASE SEE THE PERL2EXE USER MANUAL UNDER "Can't locate somemodule.pm in @INC"
FOR AN EXPLANATION OF THE FOLLOWING MESSAGE:
Can't locate DBD/mysql.pm in @INC (@INC contains: PERL2EXE_STORAGE /home/net4/FTPAnkit/perl /tmp/p2xtmp-4016) at (eval 4) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: .
at /home/net4/FTPAnkit/perl/systime line 22


Can you help me with another compiler or, helping me solve this error.

Thanks
Ankit

Nedals
06-20-2007, 02:46 PM
I am not too familiar with compiling Perl.
If you do not get an answer here, post your question on 'perlmonks.com'

hieuhan
11-19-2007, 01:44 AM
Hi,

Did you explicitly include "DBI::mysql" module into your script by "use DBI::mysql;" statement?

perl interpreter doesn't require but exe requires.

Sixtease
11-19-2007, 09:22 AM
I am not too familiar with compiling Perl.
If you do not get an answer here, post your question on 'perlmonks.com'
Perlmonks.org , not .com.

Nedals
11-20-2007, 02:41 AM
Perlmonks.org , not .com.You can use .com, .org, or .net. They all get you there!

Sixtease
11-20-2007, 05:33 AM
Wow. *blushes* I'll think before I write next time.

fahlyn
11-21-2007, 03:04 AM
I don't understand. Why would you need "compiled" perl object code? That really is very uncommon and I can hardly see any value in it at all.