Class-Tiny
view release on metacpan or search on metacpan
new takes either hashref or list yes no (list) no (hash)
Moo(se)-like BUILD/DEMOLISH yes no no
Moo(se)-like BUILDARGS yes no no
no extraneous methods via @ISA yes yes no
Why this instead of Moose or Moo?
Moose and Moo are both excellent OO frameworks. Moose offers a powerful
meta-object protocol (MOP), but is slow to start up and has about 30
non-core dependencies including XS modules. Moo is faster to start up
and has about 10 pure Perl dependencies but provides no true MOP,
relying instead on its ability to transparently upgrade Moo to Moose
when Moose's full feature set is required.
By contrast, Class::Tiny has no MOP and has zero non-core dependencies
for Perls in the support window. It has far less code, less complexity
and no learning curve. If you don't need or can't afford what Moo or
Moose offer, this is intended to be a reasonable fallback.
That said, Class::Tiny offers Moose-like conventions for things like
"BUILD" and "DEMOLISH" for some minimal interoperability and an easier
upgrade path.
lib/Class/Tiny.pm view on Meta::CPAN
Moo(se)-like BUILD/DEMOLISH yes no no
Moo(se)-like BUILDARGS yes no no
no extraneous methods via @ISA yes yes no
=head2 Why this instead of Moose or Moo?
L<Moose> and L<Moo> are both excellent OO frameworks. Moose offers a powerful
meta-object protocol (MOP), but is slow to start up and has about 30 non-core
dependencies including XS modules. Moo is faster to start up and has about 10
pure Perl dependencies but provides no true MOP, relying instead on its ability
to transparently upgrade Moo to Moose when Moose's full feature set is
required.
By contrast, Class::Tiny has no MOP and has B<zero> non-core dependencies for
Perls in the L<support window|perlpolicy>. It has far less code, less
complexity and no learning curve. If you don't need or can't afford what Moo or
Moose offer, this is intended to be a reasonable fallback.
That said, Class::Tiny offers Moose-like conventions for things like C<BUILD>
and C<DEMOLISH> for some minimal interoperability and an easier upgrade path.
( run in 0.530 second using v1.01-cache-2.11-cpan-0a6323c29d9 )