Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

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...

In reply to Re: Re: Re: Unlocking the Dark Mysteries of Acme::Bleach by demerphq
in thread Unlocking the Dark Mysteries of Acme::Bleach by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others studying the Monastery: (12)
    As of 2014-11-24 14:05 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My preferred Perl binaries come from:














      Results (141 votes), past polls