X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=t%2Flib%2FTest%2FMouse.pm;h=84f1973ab974c46bfa0f803c72754bc1f733291b;hp=80e754fa8c3d9d7a09c494f78ee70d4a5c75bce8;hb=739525d0421188856c45329c8f001e9fbe0b30b2;hpb=b61e0c46b2d97c1363692dc93a40aa8195a4523a diff --git a/t/lib/Test/Mouse.pm b/t/lib/Test/Mouse.pm index 80e754f..84f1973 100644 --- a/t/lib/Test/Mouse.pm +++ b/t/lib/Test/Mouse.pm @@ -55,6 +55,20 @@ sub has_attribute_ok ($$;$) { # Moose compatible methods/functions +package Mouse::Meta::Module; + +sub version { no strict 'refs'; ${shift->name.'::VERSION'} } +sub authority { no strict 'refs'; ${shift->name.'::AUTHORITY'} } +sub identifier { + my $self = shift; + return join '-' => ( + $self->name, + ($self->version || ()), + ($self->authority || ()), + ); +} + + package Mouse::Util::TypeConstraints; use Mouse::Util::TypeConstraints ();