mop problem 5 - Role and C3 searching is not always necessary

I think Role and C3 searching is not always necessary.

Object orientation good practice I want to tell to newbies is single inheritance and delegation.

Role is multiple inheritance. Role can have attributes. This mean role have data, not only methods. I don't think this is good.

I think the reason making mop complex is Role and C3 searching.

If Role and C3 searching are none, BUILD, BUILDARGS, DEMOLISH, $self->next::method, and many complex things is no needed. And overriding new method is easy and $self->SUPER::foo work well.

I don't deny Role …

mop problem 4 - mop is misleading name

I want to write all mop problems I am thinking before mop is added to Perl core.

mop is abbreviation of Meta Object Protocol. I think this name is misleading name. This name associate "Meta information of Object ".

But truth is that any information is Class Information, not Object information.

For example,

1. Attribute name
2. Parent class
3. Role

This is belong to Class, not Object.

    ref $object
        -> Class
            -> Attribute name
            -> Parent class
            -> Role information

The fo…

GitPrep 1.8 is released - Public key authentication support

I released GitPrep 1.8. You can install portable GitHub system into Unix / Linux easily. It is second major release.

Because you can install GitPrep into your own server, you can create users and repositories without limit. You can use GitPrep freely because GitPrep is free software. You can also install GitPrep into shared rental server.


GitPrep (Document and Repository)

Features added in 1.8 are:…

mop problem 3 - class, extends, and method keyword should be independent from mop

mop provide class, extends, and method keyword to perl. but I think these keyword should be independent from mop because these keyword is useful for non-mop modules.

I opposite only mop use these keywords. I hope these keyword is used for other modules the keywords need.

For example, current hash based module is rewrite in the following way.

Before:

package Point3D;
use Object::Simple -base => 'Point';

has z => 1;

sub clear {
my $self = shift;
...
}

After:

use Object::Simple::Syntax;

class…

mop problem 2 - Can't weaken attribute variable from outside

mop can't weaken attribute variable from outside. mop have weaken feature, but this is defined in only class and this work only when value is set. We can't weaken attribute from outside. This is not useful and some problems will occur.

# Hash base object
my $point = Point->new;
my $foo = {bar => 1};
$point->foo($foo);
weaken $point->{foo};

# mop
# We can't weaken attribute variable from outside of object.

Perl garbage collection is reference-count type. This mean if objects is referenced each other(A -> B -> A) or circle(A -> B -> C ->A), object is no…