Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

Obscuring Perl Code

When I write a program in Perl 6, is it visible to the user, like JavaScript? Or is it compiled into an interim format that is not accessible to the user?

I am considering using Perl for a public facing web page but also for downloadable tool they would run locally.

I hear there is a bin folder, but what exactly goes into this? Is it the .pl file?

Thanks
SOLUTION
Avatar of wilcoxon
wilcoxon
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of curiouswebster

ASKER

thanks
In the case of a web page, although the source of a Perl program that uses CGI to produce HTML would normally be visible to the web server, the web server would usually be configured to show only the HTML output to the web client, and not the Perl source.
Often, the server can be configured to use a bin folder name or a .pl file extension to determine whether to display source to the client, or whether to call the the source with the Common Gateway Interface and display only the resulting Hypertext Markup Language to the client.
downloadable tool they would run locally.
Perl programs normally require the Perl interpreter to be installed.  Do you have a way to convert it to a binary that will run by itself?
I may need to rethink that idea of making a downloadable Perl app for the user's desktop. I am just at the idea phase and as yet, have not even written a single Perl program.

It would be too big a step to ask ordinary users to install Perl locally.
If you are still at the idea phase, and have yet to write a single app, then perhaps you should look into a different solution.

.NET Core is available for Windows, Mac, and Linux.  Depending on your needs, using C# may be a way to go.  The Visual Studio Code editor is an excellent tool.  Check it out here: https://code.visualstudio.com/

Here is a great page to get you started: https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio-code
A user who wants to use a downloadable Perl tool on their local system should have a compatible Perl version installed on their local system, along with any Perl modules that the tool might use.

There are programs that can convert Perl scripts to executable files on some systems.
See
perldoc -q 'How can I compile my Perl program'
I think .NET CORE may be the best answer for a cross-platform, simple to install solution. And, as a .NET developer, it would be wise for me to play with CORE.

My users are in no way looking to install Perl or even know what Perl means, so .NET CORE is probably the best solution at this time.
Note also that any program you ask your users to download has to pass the scrutiny of the OS security and anti-virus programs and have permission to run.  Not always an easy thing to do.
Depending on what platform the user is running on, I'm not sure that installing support for .NET CORE would be any easier than installing support for Perl5.
For cross-platform support, Java might have a better chance of being installed on your users platform.
Ahh, I forgot that CORE was also not yet supported by default.

I think Java IS the answer!

Thanks.