summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/MooseX/ABC.pm4
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.