our @EXPORT_OK = qw(
get_linear_isa
apply_all_roles
+ version
+ authority
+ identifier
);
our %EXPORT_TAGS = (
all => \@EXPORT_OK,
*{ __PACKAGE__ . '::get_linear_isa'} = $impl;
}
+{ # adapted from Class::MOP::Module
+
+ sub version { no strict 'refs'; ${shift->name.'::VERSION'} }
+ sub authority { no strict 'refs'; ${shift->name.'::AUTHORITY'} }
+ sub identifier {
+ my $self = shift;
+ join '-' => (
+ $self->name,
+ ($self->version || ()),
+ ($self->authority || ()),
+ );
+ }
+}
+
# taken from Class/MOP.pm
{
my %cache;