NAME

Shika - Lightweight class builder with DSL

SYNOPSIS

package Point;
use Shika; # automatically turns on strict and warnings

has 'x';
has 'y';

sub clear {
    my $self = shift;
    $self->x(0);
    $self->y(0);
}

package Point3D;
use Shika;

extends 'Point';

has 'z';

after 'clear' => sub {
    my $self = shift;
    $self->z(0);
};

DESCRIPTION

Shika is yet another class builder.

THIS MODULE IS IN ITS BETA QUALITY. THE API IS STOLEN FROM SCRAPI BUT MAY CHANGE IN THE FUTURE

EXPORTED FUNCTIONS

has
extends(@superclasses)

This function will set the superclass(es) for the current class.

with(@roles)

This will apply a given set of @roles to the local class.

before $name => sub { }
after $name => sub { }
around $name => sub { }

method modifiers.

INTROSPECTION FUNCTIONS

Shika::init_class($klass)

install Shika methods in your class

Shika::add_attribute($klass, $name, $attr)

add attribute named $name to $klass.

Shika::apply_roles($target, @roles)

apply roles to $target.

WHY YET ANOTHER ONE?

I want just size class builder.

AUTHOR

tokuhirom

yappo

lestrrat

typester

charsbar

miyagawa

kan

walf443

kazuho

hidek

mattn

gfx

SEE ALSO

Moose, Mouse

REPOSITORY

svn co http://svn.coderepos.org/share/lang/perl/Shika/trunk Shika

Shika is Subversion repository is hosted at http://coderepos.org/share/. patches and collaborators are welcome.

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.