{
no
warnings
qw( once void )
;
our
$USES_MITE
=
"Mite::Class"
;
our
$MITE_SHIM
=
"Sub::HandlesVia::Mite"
;
our
$MITE_VERSION
=
"0.013000"
;
BEGIN {
my
(
$SHIM
,
$CALLER
) =
(
"Sub::HandlesVia::Mite"
,
"Sub::HandlesVia::Toolkit::Plain"
);
(
*after
,
*around
,
*before
,
*extends
,
*has
,
*signature_for
,
*with
) =
do
{
no
warnings
'redefine'
;
(
sub
{
$SHIM
->HANDLE_after(
$CALLER
,
"class"
,
@_
) },
sub
{
$SHIM
->HANDLE_around(
$CALLER
,
"class"
,
@_
) },
sub
{
$SHIM
->HANDLE_before(
$CALLER
,
"class"
,
@_
) },
sub
{ },
sub
{
$SHIM
->HANDLE_has(
$CALLER
,
has
=>
@_
) },
sub
{
$SHIM
->HANDLE_signature_for(
$CALLER
,
"class"
,
@_
) },
sub
{
$SHIM
->HANDLE_with(
$CALLER
,
@_
) },
);
};
}
BEGIN {
our
@ISA
;
push
@ISA
,
"Sub::HandlesVia::Toolkit"
;
}
sub
DOES {
my
(
$self
,
$role
) =
@_
;
our
%DOES
;
return
$DOES
{
$role
}
if
exists
$DOES
{
$role
};
return
1
if
$role
eq __PACKAGE__;
if
(
$INC
{
'Moose/Util.pm'
}
and
my
$meta
= Moose::Util::find_meta(
ref
$self
or
$self
) )
{
$meta
->can(
'does_role'
) and
$meta
->does_role(
$role
) and
return
1;
}
return
$self
->SUPER::DOES(
$role
);
}
sub
does {
shift
->DOES(
@_
);
}
1;
}