On 2/12/13 12:54 PM, John SJ Anderson wrote:
Also, I'm a little disappointed in the "it's Perl, it's already
obfuscated" answers. If you think the Perl you're writing is
pre-obfuscated, you're doing it wrong. My Perl code is idiomatic, easy
to read and understand, and as clear, if not more so, than code
written in any other language. One of the common criticisms of Perl is
that it's a "write-only language". This is, frankly, bullshit -- but
having people on a list aimed at helping Perl beginners promote that
bullshit only makes it more odorous. Please stop.

I'm an experienced developer in several other languages (Python, Tcl, AppleScript, JavaScript, C/Objective C), so I'm quite familiar with structuring a program--but as I work on learning Perl, I find it somewhat obscure, if not downright obfuscated. None of the other languages I've worked with have the equivalent of the $_ implicit var, for instance. Looking at some sample code online, I had to spend a considerable amount of time looking up the various bits with sigils and annotating them, cf:

 open (INPUT, "< $_"); ##input from default $_ var
        foreach (<INPUT>) {
if(/$searchstring/i) { ##case-insenstive regex for $searchstring
                $_ = substr($_, 0, 60);   ##trim string to 60 chars
                s/^\s*//; #trim leading space
print "$File::Find::name\:$.\:\t$_\n"; #print filename followed by line number followed by tab followed by matching line
                
            }
        }
        close INPUT;

Perhaps this is idiomatic to you, but it's very dense to me. And I have a decade of development experience.

All kidding aside, perhaps one way the OP could obfuscate his code is to deploy it in a PAR file--how hard are those to unwrap? Does Perl have the equivalent of Python bytecode files, i.e. pyc, that are obfuscated? If not, the OP's options may be limited.

--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to