Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable workaround for old Moose versions.
- Loading branch information
Showing
1 changed file
with
5 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
package MooseX::Role::WithOverloading::Meta::Role; | ||
# ABSTRACT: Roles which support overloading | ||
|
||
use Moose (); | ||
use Moose 0.94 (); | ||
use Moose::Role; | ||
use aliased 'MooseX::Role::WithOverloading::Meta::Role::Composite', 'CompositionRole'; | ||
use namespace::autoclean; | ||
|
||
$Moose::VERSION >= 0.9301 | ||
? around composition_class_roles => sub { | ||
my ($orig, $self) = @_; | ||
return $self->$orig, | ||
CompositionRole; | ||
} | ||
: has '+composition_class_roles' => ( | ||
default => sub { [ CompositionRole ] }, | ||
); | ||
around composition_class_roles => sub { | ||
my ($orig, $self) = @_; | ||
return $self->$orig, CompositionRole; | ||
}; | ||
|
||
1; |