> Using a namespace is not "polluting" it. It's just using it.

It should be mentioned that you don't necessarily have access to all these namespaces, e.g. because you are working in a team.

And you don't necessarily know which package to use, because your dealing with different companies with different rules for deactivating employees.

Concerning the performance argument of OOP in Perl, IIRC it's true that method calls are 10 times slower than calling directly!

But it's usually better to have working code before you care about performance.

You can still fall back to direct calls if it's recommended after profiling.

IMHO there is even a syntax for this in OO Perl by using a method reference.

$obj_ref->$method_ref()

e.g. in a costly loop, you just need to request the code-reference when initializing, and you don't even need to change the interface of the method you call!

Perl has it all! =)

Cheers Rolf


In reply to Re^6: Benefits of everything is an object? Or new sigils? (performance) by LanX
in thread Benefits of everything is an object? Or new sigils? by LanX

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.