Synopsis
package BaseClass 0.001 {
use Finglware;
attr 'name', 'age';
method __init($name, $age) {
$self->attr_set(
name => $name,
age => $age,
);
}
}
package People 0.001 {
use Finglware;
extends 'BaseClass';
method __init($name, $age) {
$self->SUPER::__init(@_);
}
}
my $person = People->new('Fingl Ware', 1);
say $person->name;
Description
Finglware?
The synopsis doesn't really give away much about Finglware (Sorry about the name, but I have no idea what this falls under as). There has been a lot of talk around the forums I use as to why Perl is not as popular as it should be. A lot of arguments have been lack of method signatures and boilerplate pragmas on every script/module. I wanted to try and incorporate as much boilerplate as I could, and fix as many problems as I could without tampering too much with the syntax or the way you write Perl with this module. It has a minor OOP framework, but still allows for flexibility. Finglware comes with automated constructors, but will call _init if it's available after "new". Within this _init method you can set accessors and what-not. Finglware, by default, is modular. Basically you write your plugin "Finglware::Plugin::SomePlugin", then use it like "use Finglware with => 'SomePlugin'. When writing plugins you'll get automatic access to Finglware::LOP (Lightweight Object Protocol), which is still in early beta, but pretty cool nonetheless. You can see how it works with Finglware's core plugin "Hooks". If you want to see how Finglware works in more detail, check out the tests in the git repo. I don't think I will be releasing this to the CPAN, because I can't imagine a lot of people would want/need it. But it will be hanging around on Github for those who are interested.
What Finglware provides
- Imports 5.10 features (ie: state, switch statements and say)
- Imports warnings/strict
- Automatic constructor (new)
- Simple accessors
- Slightly modified OOP (the __init method)
- Structs (see type::struct)
- Go printing (see fmt::*)
- Modular by design (Create plugins within the Finglware::Plugin:: namespace)
- Imports Method::Signatures::Simple (method and func keywords)

Comments
Did you check the Class:: namepace on CPAN?
What do you think Finglware is better than in Moo ?
Finglware is not better than Moo - I use Moo, in fact. Finglware just gives you a few convenience features without changing the way Perl 5 OOP works too much. It also has method signatures.
Please sign up to post a review.