Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I propose a change instead of a removal,

    ref ($proto) || $proto;

    should be changed to:

    ref ($class) || $class;

    This would keep it in a OOP wording and possibly make it more essential for Perl-OOP beginners to understand what is going on.

    The construct is quite essential (I personally always use it).

    If you use inheritance, the result of not using could be strange since many people would perhaps not understand why their inheritance does not work and errors, which might be quite difficult to debug will occur

    • Unfortunately this is a classic example of not understanding it - just copying it.

      This has nothing to do with inheritance or the two arg form of bless. It only has to do with being able to call ->new() on an instance of the class, and whether or not that's a good idea.

      Most people will never ever do this (as what they really want is a copy constructor, not a "call new on the object" method). I agree that all of these should be removed from the docs forthwith, but not just the docs, I think they should b