=pod
=for comment
DO NOT EDIT. This Pod was generated by Swim.
See http://github.com/ingydotnet/swim-pm#readme
=encoding utf8
=head1 NAME
Spiffy - Spiffy Perl Interface Framework For You
=for html
=head1 SYNOPSIS
package Keen;
use Spiffy -Base;
field 'mirth';
const mood => ':-)';
sub happy {
if ($self->mood eq ':-(') {
$self->mirth(-1);
print "Cheer up!";
}
super;
}
=head1 DESCRIPTION
"Spiffy" is a framework and methodology for doing object oriented (OO)
programming in Perl. Spiffy combines the best parts of Exporter.pm, base.pm,
mixin.pm and SUPER.pm into one magic foundation class. It attempts to fix all
the nits and warts of traditional Perl OO, in a clean, straightforward and
(perhaps someday) standard way.
Spiffy borrows ideas from other OO languages like Python, Ruby, Java and Perl
6. It also adds a few tricks of its own.
If you take a look on CPAN, there are a ton of OO related modules. When
starting a new project, you need to pick the set of modules that makes most
sense, and then you need to use those modules in each of your classes. Spiffy,
on the other hand, has everything you'll probably need in one module, and you
only need to use it once in one of your classes. If you make Spiffy.pm the
base class of the basest class in your project, Spiffy will automatically pass
all of its magic to all of your subclasses. You may eventually forget that
you're even using it!
The most striking difference between Spiffy and other Perl object oriented
base classes, is that it has the ability to export things. If you create a
subclass of Spiffy, all the things that Spiffy exports will automatically be
exported by your subclass, in addition to any more things that you want to
export. And if someone creates a subclass of your subclass, all of those
things will be exported automatically, and so on. Think of it as "Inherited
Exportation", and it uses the familiar Exporter.pm specification syntax.
To use Spiffy or any subclass of Spiffy as a base class of your class, you
specify the C<-base> argument to the C