Don't think of it as Obfuscation, think product activation.

Essentially the same problem. Your program contains checks à la is_product_activated(). And you don't want the end-user to use your product when it is not "activated". As a minor variant, the "activation" allows decrypting encrypted code needed for advanced features.

Did you know that perl can load and run an arbitary script whenever it is started (search for "sitecustomize.pl" in perlrun)? So monkeypatching those functions should be quite easy. And of course, there is B::Deparse, making all obfuscation futile. Decrypting the encrypted code can be done using the required decryption functions of the program, e.g. from sitecustomize.pl. The code can then be written to a plain file, using a simple print if it is eval""uated, or using B::Deparse for more complex setups.

Product activation is just nonsense. Look at Microsoft's current products. You are told that you have to activate them, but that's not true. People found various ways to circumvent the need for activation. One old and trivial way is to set the clock to the far future, install the product, turn the clock back, and enjoy a decades long evaluation phase. Another way is to fool the product into thinking it runs on an OEM system, where the activation is not needed. And you can bet that Microsoft invested a lot of work into the product activation.

Hire a good lawyer, make him write a good contract for selling your product. Sell support and updates for your product, not just the product.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^3: How do I textually combine a large number of modules into a single file? by afoken
in thread How do I textually combine a large number of modules into a single file? by Vlad, the IM-perler

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.