LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

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

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


hi,

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 bar.pl, anybody can just do a "less bar.pl" 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.

thanks
randomx
 
Old 06-26-2004, 03:22 PM   #2
aluser
Member
 
Registered: Mar 2004
Location: Massachusetts
Distribution: Debian
Posts: 557

Rep: Reputation: 42
There was a post about nonreadable bash scripts on here or linuxforum.com 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
 
  


Reply


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 05:48 PM
i want practical perl code... kaktous Programming 4 03-18-2005 02:16 PM
What would this code do in PERL? jdruin Linux - Software 2 11-22-2004 03:12 AM
Perl: What's this mean? (Code sample) Benr Programming 5 10-23-2004 07:20 AM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM


All times are GMT -5. The time now is 02:24 PM.

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