blob: 778a81a73d8cbd5501c784329c59487eb115a9d2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
package MooseX::ABC::Role::Object;
use Moose::Role;
around new => sub {
my $orig = shift;
my $class = shift;
my $meta = Class::MOP::class_of($class);
$meta->throw_error("$class is abstract, it cannot be instantiated")
if $meta->has_required_methods;
$class->$orig(@_);
};
no Moose::Role;
1;
|