I am mind blown right now.

It is going to sound retarded, but I just realized or remembered that perl was object oriented

I thought most singleton patterns in perl used a flock to ensure there was only one instance of a script running, but we can actually create new objects and call their functions. Also, according to my testings, it seems like the code within a package is always executed after using the 'use' statement which was not what I expected

Sorry if I was a little in doubt, I only code programs in perl once a year and I guess that what I had to do was never quite complex

Thank you very much for the help, a lots of new doors just opened to me ahah. I still can't believe I had tried to understand some the modules found on CPAN and did not recall it was using objects, I feel so ashamed lol. I probably just noticed it and went back to my regular implementation without giving it too much thoughts since it was not required at all for what I had to do. Again, thank you for making me realize I was missing one of the most basic feature of the language


In reply to Re^4: Data Persistence by ShaZe
in thread Data Persistence by ShaZe

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.