diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-07-02 20:00:11 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-07-02 20:00:11 -0500 |
commit | 7d155c5a542bb50f39ca91e10bd3462ff0968c56 (patch) | |
tree | 0f25e22311aef74d3c2fe0fe5b8e970ad9002139 | |
parent | 1a87d00d919c69fd8109be6b019a0b2af227f13a (diff) | |
download | moosex-abc-7d155c5a542bb50f39ca91e10bd3462ff0968c56.tar.gz moosex-abc-7d155c5a542bb50f39ca91e10bd3462ff0968c56.zip |
add a bit more to the synopsis
-rw-r--r-- | lib/MooseX/ABC.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/MooseX/ABC.pm b/lib/MooseX/ABC.pm index 3ced614..c8eec75 100644 --- a/lib/MooseX/ABC.pm +++ b/lib/MooseX/ABC.pm @@ -26,6 +26,10 @@ MooseX::ABC - abstract base classes for Moose my $shape = Shape->new; # dies my $circle = Circle->new; # succeeds + package Square; + use Moose; + extends 'Shape'; # dies, since draw is unimplemented + =head1 DESCRIPTION This module adds basic abstract base class functionality to Moose. Doing C<use MooseX::ABC> turns the using class into an abstract class - it cannot be instantiated. It also allows you to mark certain methods in the class as L</required>, meaning that if a class inherits from this class without implementing that method, it will die at compile time. |