Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
The fact that MI is quite hard to do in Perl, and considering that most authors make it even harder might also be an not insignificant reason why you don't see many modules making use of MI.

But I'm not saying you should use MI. I'm just saying it's impolite to make it harder for others to use MI. The harder you make it for others to do things (for instance, setting magical variables without using local, not using name spaces, writing code that isn't cross-platform), the less useful your code is.

Let's not forget the question of the OP: Are there any limits on what you can/can't or should/shouldn't put into a constructor?. An answer to that question is don't put initialization of your object in the constructor, because it makes it harder to do MI.

Perl --((8:>*

In reply to Re^7: Object Constructors - Advice of experienced OO Perl Monks by Perl Mouse
in thread Object Constructors - Advice of experienced OO Perl Monks by ghenry

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2022-10-07 12:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (29 votes). Check out past polls.

    Notices?