Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-26-2004, 03:13 PM   #1
Registered: Feb 2003
Location: Hawaii
Distribution: Debian
Posts: 130

Rep: Reputation: 16
Hiding code in PERL, perl gui question


Sorry for the dumb questions. I'm a newbie. I'm learning java and perl on my own.

1. How do you "hide" your perl code from people it?
For example, after you have created your program, anybody can just do a "less" and there you go. All the code is right in front of you. How do you avoid that?

2. Is there something like a Linux GUI application for perl? I'm looking something like VB or Visual C++. You know, draw form, draw a button, double click on the button, and tell it to do something.

Old 06-26-2004, 04:22 PM   #2
Registered: Mar 2004
Location: Massachusetts
Distribution: Debian
Posts: 557

Rep: Reputation: 42
There was a post about nonreadable bash scripts on here or recently. This is the same problem and the short answer is that you can't get there from here. The kernel runs your perl script by starting perl and handing it the script's filename as the first argument. perl then has to read the script in order to execute it.

Workarounds are:
  • use an experimental perl compiler to get native code. see "perldoc -q compile"
  • create a suid C wrapper which opens the file before setuid() and setgroups()ing to its ruid and then feeds the file to pelr (You also need to open a couple of file descriptors and clear the environment to make this secure.)

There are several gui apis for perl, including gtk and tk bindings. check on cpan or your distro's packages collection


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
perl send mail code pragti Programming 2 03-17-2006 06:48 PM
i want practical perl code... kaktous Programming 4 03-18-2005 03:16 PM
What would this code do in PERL? jdruin Linux - Software 2 11-22-2004 04:12 AM
Perl: What's this mean? (Code sample) Benr Programming 5 10-23-2004 08:20 AM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 09:09 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration