use Data::OptList;
use Sub::Exporter;
-our $VERSION = '0.07';
+our $VERSION = '0.08';
our $AUTHORITY = 'cpan:STEVAN';
use Moose ();
# make a subtype for each Moose class
subtype $role
=> as 'Role'
- => where { $_->does($role) }
- => optimize_as { blessed($_[0]) && $_[0]->can('does') && $_[0]->does($role) }
+ => where { Moose::Util::does_role($_, $role) }
+ => optimize_as { blessed($_[0]) && Moose::Util::does_role($_[0], $role) }
unless find_type_constraint($role);
my $meta;
&& defined $_[1]->{into_level} ? caller( $_[1]->{into_level} )
: caller();
+ # this works because both pragmas set $^H (see perldoc perlvar)
+ # which affects the current compilation - i.e. the file who use'd
+ # us - which is why we don't need to do anything special to make
+ # it affect that file rather than this one (which is already compiled)
strict->import;
warnings->import;