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
newbiewebSr. Software EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wilcoxonCommented:
In Perl 5, the code is definitely visible to the user.

In Perl 6, it probably is if you distribute the .pl - however, Perl 6 runs on Moar VM so, if you can "capture" the byte code executable (not sure if you can), then it should be unreadable (or at least not easily readable).
Jim RiddlesPrepress/OMS SpecialistCommented:
Here is a link to a chapter from Mastering Perl by Brian D Foy: Mastering Perl

One sentence stands out:
If you’re spending your time trying to hide your source from the people you’re giving it to, you’re wasting your time.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
newbiewebSr. Software EngineerAuthor Commented:
thanks
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

ozoCommented:
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.
Dave BaldwinFixer of ProblemsCommented:
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?
newbiewebSr. Software EngineerAuthor Commented:
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.
Jim RiddlesPrepress/OMS SpecialistCommented:
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
ozoCommented:
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'
newbiewebSr. Software EngineerAuthor Commented:
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.
Dave BaldwinFixer of ProblemsCommented:
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.
ozoCommented:
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.
newbiewebSr. Software EngineerAuthor Commented:
Ahh, I forgot that CORE was also not yet supported by default.

I think Java IS the answer!

Thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.