Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (17 sloc) 404 Bytes
#!/usr/bin/perl
use strict;
use warnings;
use Test::More;
use mop;
role Foo {
method bar;
}
class Gorch with Foo is abstract {}
ok(mop::meta('Gorch')->is_abstract, '... composing a role with still required methods creates an abstract class');
eval { Gorch->new };
like(
$@,
qr/Cannot instantiate abstract class \(Gorch\)/,
'... cannot create an instance of Gorch'
);
done_testing;
Jump to Line
Something went wrong with that request. Please try again.