Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Unlocking the Dark Mysteries of Acme::Bleach

by Anonymous Monk
on Jun 29, 2003 at 22:46 UTC ( #270035=note: print w/ replies, xml ) Need Help??


in reply to Re: Unlocking the Dark Mysteries of Acme::Bleach
in thread Unlocking the Dark Mysteries of Acme::Bleach

I believe that in lines 12 and 13, the source code is encoded (bleached), BUT why does he print "use Acme::Bleach" before he whitens?

As I mentioned before the use line cause both compression and decompression. So of course it has to be output. Furthermore if he output the use line encoded perl would just ignore the whitespace.

What? How can a Perl script be executed without the hash line (#!/usr/bin/perl)? I sorta understand the first bleaching, but how can the script work on subsequent occasions without the hash line?!?


Comment on Re: Re: Unlocking the Dark Mysteries of Acme::Bleach
Re: Re: Re: Unlocking the Dark Mysteries of Acme::Bleach
by demerphq (Chancellor) on Jun 29, 2003 at 23:05 UTC

    Blink. Blink. Blink.

    What? How can a Perl script be executed without the hash line (#!/usr/bin/perl)? I sorta understand the first bleaching, but how can the script work on subsequent occasions without the hash line?!?

    Where to start. Ok, at the Acme::Bleach level, he doesnt care. The file hes produced, only will ever make sense if perl itself reads it and runs it. So the presence or absence of the shebange line is neither here nor there. Its up to the user to make that happen as far as hes concerned. (Although the code is patchable to preserve any existing shebang line, perhaps you should prepare a patch?)

    Second, of course its possible for the script to be executed without a shebang line. perl script.pl or perl script.pm works perfectly fine, and on many of the OS's that Perl (and Acme::Bleach) run on shebang lines dont mean anything at all (except that Perl itself pretends like they do). On Win32 for instance file associations are via the registry.

    I think he expects the line to be the top one, (I've not read the docs, only the code you posted), and that if you want a shebang line or anything else used first that you'll put it in after the use Acme::Bleach does the encode.

    But I dont think you should take the failings of the module too seriously, I dont think he took any of it seriously :-)


    ---
    demerphq

    <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...
      Whoa! The shebang line is optional? I always thought that the shebang was very important and necessary, at least that is what I was taught. I never knew that it was optional. On Win32, you put #! perl.exe as the first line. . . I guess you learn something new everyday on this site!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://270035]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2014-07-23 03:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (132 votes), past polls