Skip to content

Commit

Permalink
no warnings once; fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyink committed Jul 3, 2022
1 parent 011504a commit 5f5ea5b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Role/Hooks.pm
Expand Up @@ -71,6 +71,7 @@ sub is_role {
}

no strict 'refs';
no warnings 'once';
my $UM = ${"$target\::USES_MITE"};
if ( defined $UM and $UM eq 'Mite::Role' ) {
return 'Mite::Role';
Expand Down
12 changes: 12 additions & 0 deletions t/99nonrole.t
@@ -0,0 +1,12 @@
use strict;
use warnings;
use Test::More;
use Role::Tiny;

BEGIN {
package Foo;
sub new { bless [], shift }
};

ok ! Role::Tiny->is_role( 'Foo' );
done_testing;

0 comments on commit 5f5ea5b

Please sign in to comment.