X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FModule.pm;h=4b28c0798d72c8c89bef14e3824dbca78c7c6fec;hp=01d42c10ee943980bead033f81fd51b0317c2b94;hb=23264b5b200f08d7258efc1509846d0a161194e1;hpb=cd2b92018095c8d3bc88f46cef5f5a0a11e0bf3b diff --git a/lib/Mouse/Meta/Module.pm b/lib/Mouse/Meta/Module.pm index 01d42c1..4b28c07 100755 --- a/lib/Mouse/Meta/Module.pm +++ b/lib/Mouse/Meta/Module.pm @@ -3,12 +3,25 @@ use strict; use warnings; use Scalar::Util qw/blessed weaken/; -use Mouse::Util qw/version authority identifier get_code_info/; +use Mouse::Util qw/get_code_info/; use Carp 'confess'; sub name { $_[0]->{package} } sub _method_map{ $_[0]->{methods} } + +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 || ()), + ); +} + + sub namespace{ my $name = $_[0]->{package}; no strict 'refs';