May 2014 Archives

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…

Perl Tweet Time Line News released!

Perl Tweet Time Line News is released!

Perl Tweet Time Line News

Latest tweets related with perl is picked up .

About Yuki Kimoto

user-pic I'm Perl Programmer. I LOVE Perl. I want to contribute Perl community and Perl users.