Test-Moose-More-0.050/0000750000175000017500000000000013160632377014670 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/lib/0000750000175000017500000000000013160632377015436 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/lib/Test/0000750000175000017500000000000013160632377016355 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/lib/Test/Moose/0000750000175000017500000000000013160632377017437 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/lib/Test/Moose/More/0000750000175000017500000000000013160632377020341 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/lib/Test/Moose/More/Utils.pm0000640000175000017500000000563113160632377022005 0ustar rsrchboyrsrchboy# # This file is part of Test-Moose-More # # This software is Copyright (c) 2017, 2016, 2015, 2014, 2013, 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Test::Moose::More::Utils; our $AUTHORITY = 'cpan:RSRCHBOY'; $Test::Moose::More::Utils::VERSION = '0.050'; # ABSTRACT: Various utility functions for TMM (and maybe others!) use strict; use warnings; use Sub::Exporter::Progressive -setup => { exports => [ qw{ get_mop_metaclass_for known_sugar } ], groups => { default => [':all'] }, }; use Carp 'croak'; use List::Util 1.33 qw( first all ); use Scalar::Util 'blessed'; sub get_mop_metaclass_for { my ($mop, $meta) = @_; # FIXME make this less... bad # short-circuit! Better a special case here than *everywhere* else return blessed $meta if $mop eq 'class' || $mop eq 'role'; # this code largely lifted from Moose::Util::MetaRole my $attr = first { $_ } map { $meta->meta->find_attribute_by_name($_) } ("${mop}_metaclass", "${mop}_class") ; croak "Cannot find attribute storing the metaclass for $mop in " . $meta->name unless $attr; my $read_method = $attr->get_read_method; return $meta->$read_method(); } sub known_sugar () { qw{ has around augment inner before after blessed confess } } !!42; __END__ =pod =encoding UTF-8 =for :stopwords Chris Weyl Chad Etheridge Granum Karen TMM =head1 NAME Test::Moose::More::Utils - Various utility functions for TMM (and maybe others!) =head1 VERSION This document describes version 0.050 of Test::Moose::More::Utils - released September 20, 2017 as part of Test-Moose-More. =head1 FUNCTIONS =head2 get_mop_metaclass_for $mop => $meta Given a MOP name (e.g. attribute), rummage through $meta (a metaclass) to reveal the MOP's metaclass. e.g. get_metaclass_for attribute => __PACKAGE__->meta; =head2 known_sugar Returns a list of all the known standard Moose sugar (has, extends, etc). =head1 SEE ALSO Please see those modules/websites for more information related to this module. =over 4 =item * L =item * L -- for much of the "find the metaclass for X mop" code|L -- for much of the "find the metaclass for X mop" code> =back =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 AUTHOR Chris Weyl =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2017, 2016, 2015, 2014, 2013, 2012 by Chris Weyl. This is free software, licensed under: The GNU Lesser General Public License, Version 2.1, February 1999 =cut Test-Moose-More-0.050/lib/Test/Moose/More.pm0000640000175000017500000012565413160632377020715 0ustar rsrchboyrsrchboy# # This file is part of Test-Moose-More # # This software is Copyright (c) 2017, 2016, 2015, 2014, 2013, 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Test::Moose::More; our $AUTHORITY = 'cpan:RSRCHBOY'; # git description: 0.049-1-g0a65e1a $Test::Moose::More::VERSION = '0.050'; # ABSTRACT: More tools for testing Moose packages use strict; use warnings; use Sub::Exporter::Progressive -setup => { exports => [ qw{ attribute_options_ok check_sugar_ok check_sugar_removed_ok definition_context_ok does_metaroles_ok does_not_metaroles_ok does_not_ok does_not_require_method_ok does_ok has_attribute_ok has_method_from_anywhere_ok has_method_ok has_no_method_from_anywhere_ok has_no_method_ok is_anon is_anon_ok is_class is_class_ok is_immutable_ok is_not_anon is_not_anon_ok is_not_immutable_ok is_not_pristine_ok is_pristine_ok is_role is_role_ok meta_ok method_from_pkg_ok method_is_accessor_ok method_is_not_accessor_ok method_not_from_pkg_ok no_meta_ok requires_method_ok role_wraps_after_method_ok role_wraps_around_method_ok role_wraps_before_method_ok validate_attribute validate_class validate_role validate_thing with_immutable } ], groups => { default => [ ':all' ], validate => [ map { "validate_$_" } qw{ attribute class role thing } ], }, }; use Test::Builder; use Test::More; use Test::Moose 'with_immutable'; use List::MoreUtils 'apply'; use Scalar::Util 'blessed'; use Syntax::Keyword::Junction 'any'; use Moose::Util 'resolve_metatrait_alias', 'does_role', 'find_meta'; use Moose::Util::TypeConstraints; use Carp 'confess'; use Data::OptList; use Test::Moose::More::Utils; # debugging... #use Smart::Comments; my $tb = Test::Builder->new(); our $THING_NAME; sub _thing_name { my ($thing, $thing_meta) = @_; return $THING_NAME if $THING_NAME; $thing_meta ||= find_meta($thing); # try very hard to come up with a meaningful name my $desc = !!$thing_meta ? $thing_meta->name : blessed $thing ? ref $thing : ref $thing ? 'The object' : $thing ; return $desc; } { my $_yes = sub { $tb->ok(!!shift, shift . ' has a meta') }; my $_no = sub { $tb->ok( !shift, shift . ' does not have a meta') }; sub meta_ok ($;$) { _method_ok_guts($_yes, $_[0], @_) } sub no_meta_ok ($;$) { _method_ok_guts($_no, $_[0], @_) } } sub does_ok ($$;$) { my ($thing, $roles, $message) = @_; my $thing_meta = find_meta($thing); $roles = [ $roles ] unless ref $roles; $message ||= _thing_name($thing, $thing_meta) . ' does %s'; # this generally happens when we're checking a vanilla attribute # metaclass, which turns out to be a # Class::MOP::Class::Immutable::Class::MOP::Class. If our metaclass does # not have a does_role() method, then by definition the metaclass cannot # do the role (that is, it's a Class::MOP metaclass). my $_does = $thing_meta->can('does_role') || sub { 0 }; BEGIN { warnings::unimport 'redundant' if $^V gt v5.21.1 } $tb->ok(!!$thing_meta->$_does($_), sprintf($message, $_)) for @$roles; return; } sub does_not_ok ($$;$) { my ($thing, $roles, $message) = @_; my $thing_meta = find_meta($thing); $roles = [ $roles ] unless ref $roles; $message ||= _thing_name($thing, $thing_meta) . ' does not do %s'; my $_does = $thing_meta->can('does_role') || sub { 0 }; BEGIN { warnings::unimport 'redundant' if $^V gt v5.21.1 } $tb->ok(!$thing_meta->$_does($_), sprintf($message, $_)) for @$roles; return; } # helper to dig for an attribute sub _find_attribute { my ($thing, $attr_name) = @_; my $meta = find_meta($thing); # if $thing is a role, find_attribute_by_name() is not available to us return $meta->isa('Moose::Meta::Role') ? $meta->get_attribute($attr_name) : $meta->find_attribute_by_name($attr_name) ; } sub has_attribute_ok ($$;$) { my ($thing, $attr_name, $message) = @_; $message ||= _thing_name($thing) . " has an attribute named $attr_name"; return $tb->ok(!!_find_attribute($thing => $attr_name), $message); } { my $_has_test = sub { $tb->ok(!!$_[0]->has_method($_), "$_[1] has method $_") }; my $_no_test = sub { $tb->ok( !$_[0]->has_method($_), "$_[1] does not have method $_") }; sub has_no_method_ok ($@) { _method_ok_guts($_no_test, @_) } sub has_method_ok ($@) { _method_ok_guts($_has_test, @_) } } { my $_has_test = sub { $tb->ok(!!$_[0]->find_method_by_name($_), "$_[1] has method $_") }; my $_no_test = sub { $tb->ok( !$_[0]->find_method_by_name($_), "$_[1] does not have method $_") }; sub has_no_method_from_anywhere_ok ($@) { _method_ok_guts($_no_test, @_) } sub has_method_from_anywhere_ok ($@) { _method_ok_guts($_has_test, @_) } } sub _method_ok_guts { my ($_test, $thing, @methods) = @_; ### $thing my $meta = find_meta($thing); my $name = _thing_name($thing, $meta); # the test below is run two stack frame up (down?), so let's handle that local $Test::Builder::Level = $Test::Builder::Level + 2; # "tiny evil?" -- Eleanor Weyl ### @methods $_test->($meta => $name) for @methods; return; } { my $_yes = sub { $tb->ok($_[0]->original_package_name eq $_[1], "$_[3] is from $_[1]") }; my $_no = sub { $tb->ok($_[0]->original_package_name ne $_[1], "$_[3] is not from $_[1]") }; sub method_from_pkg_ok($$$) { _method_from_pkg_ok($_yes, @_) } sub method_not_from_pkg_ok($$$) { _method_from_pkg_ok($_no, @_) } my $_yes_acc = sub { $tb->ok( $_[0]->isa('Class::MOP::Method::Accessor'), "$_[3] is an accessor method") }; my $_no_acc = sub { $tb->ok(!$_[0]->isa('Class::MOP::Method::Accessor'), "$_[3] is not an accessor method") }; sub method_is_accessor_ok($$) { _method_from_pkg_ok($_yes_acc, @_) } sub method_is_not_accessor_ok($$) { _method_from_pkg_ok($_no_acc, @_) } } sub _method_from_pkg_ok { my ($test, $thing, $method, $orig_pkg) = @_; ### $thing my $meta = find_meta($thing); my $name = _thing_name($thing, $meta); local $Test::Builder::Level = $Test::Builder::Level + 1; my $mmeta = $meta->find_method_by_name($method) or return $tb->ok(0, "$name has no method $method"); local $Test::Builder::Level = $Test::Builder::Level + 1; return $test->($mmeta, $orig_pkg, $meta, "${name}'s method $method"); } sub definition_context_ok ($$) { my ($meta, $dc) = @_; my $name = _thing_name($meta, $meta); return unless $tb->ok( $meta->can('definition_context'), "$name can definition_context()", ); my $meta_dc = $meta->definition_context; ### $dc ### $meta_dc local $Test::Builder::Level = $Test::Builder::Level + 1; return is_deeply $meta_dc => $dc, "$name definition context is strictly correct"; } sub role_wraps_around_method_ok ($@) { _role_wraps(around => @_) } sub role_wraps_before_method_ok ($@) { _role_wraps(before => @_) } sub role_wraps_after_method_ok ($@) { _role_wraps(after => @_) } sub _role_wraps { my ($style, $thing, @methods) = @_; my $meta_method = "get_${style}_method_modifiers"; ### $thing my $meta = find_meta($thing); my $name = _thing_name($thing, $meta); ### @methods local $Test::Builder::Level = $Test::Builder::Level + 2; $tb->ok(!!$meta->$meta_method($_), "$name wraps $style method $_") for @methods; return; } { my $_is_test = sub { $tb->ok( $_[0]->requires_method($_), "$_[1] requires method $_") }; my $_not_test = sub { $tb->ok(!$_[0]->requires_method($_), "$_[1] does not require method $_") }; sub requires_method_ok ($@) { _method_ok_guts($_is_test, @_) } sub does_not_require_method_ok ($@) { _method_ok_guts($_not_test, @_) } } sub is_immutable_ok ($;$) { my ($thing, $message) = @_; ### $thing my $meta = find_meta($thing); $message ||= _thing_name($thing, $meta) . ' is immutable'; return $tb->ok($meta->is_immutable, $message); } sub is_not_immutable_ok ($;$) { my ($thing, $message) = @_; ### $thing my $meta = find_meta($thing); $message ||= _thing_name($thing, $meta) . ' is not immutable'; return $tb->ok(!$meta->is_immutable, $message); } { my $_is_test = sub { $tb->ok( $_[0]->is_pristine(), "$_[1] is pristine") }; my $_not_test = sub { $tb->ok(!$_[0]->is_pristine(), "$_[1] is not pristine") }; # FIXME should probably rename _method_ok_guts()... sub is_pristine_ok ($) { _method_ok_guts($_is_test, @_, q{}) } sub is_not_pristine_ok ($) { _method_ok_guts($_not_test, @_, q{}) } } # NOTE: deprecate at some point late 2015 sub is_role ($) { goto \&is_role_ok } sub is_class ($) { goto \&is_class_ok } sub is_role_ok ($) { unshift @_, 'Role'; goto \&_is_moosey_ok } sub is_class_ok ($) { unshift @_, 'Class'; goto \&_is_moosey_ok } sub _is_moosey_ok { my ($type, $thing) = @_; my $thing_name = _thing_name($thing); my $meta = find_meta($thing); $tb->ok(!!$meta, "$thing_name has a metaclass"); return unless !!$meta; my $is_moosey = $meta->isa("Moose::Meta::$type"); # special check for class -- this will happen when, say, you're validating # an attribute and it's a bog standard Moose::Meta::Attribute: strictly # speaking its metaclass is Class::MOPish, but really, # a Moose::Meta::Attribute is a Moose class. Or arguably so. Certainly # in the context of what we're asking about here. Better approaches to # this welcomed as pull requests :) $is_moosey ||= ($meta->name || q{}) =~ /^Moose::Meta::/ if $type eq 'Class'; return $tb->ok($is_moosey, "$thing_name is a Moose " . lc $type); } # NOTE: deprecate at some point late 2015 sub is_anon ($) { goto \&is_anon_ok } sub is_not_anon ($) { goto \&is_not_anon_ok } sub is_anon_ok ($) { my ($thing, $message) = @_; my $thing_meta = find_meta($thing); $message ||= _thing_name($thing, $thing_meta) . ' is anonymous'; return $tb->ok(!!$thing_meta->is_anon, $message); } sub is_not_anon_ok ($) { my ($thing, $message) = @_; my $thing_meta = find_meta($thing); $message ||= _thing_name($thing, $thing_meta) . ' is not anonymous'; return $tb->ok(!$thing_meta->is_anon, $message); } sub check_sugar_removed_ok ($) { my $t = shift @_; # check some (not all) Moose sugar to make sure it has been cleared $tb->ok(!$t->can($_) => "$t cannot $_") for known_sugar; return; } sub check_sugar_ok ($) { my $t = shift @_; # check some (not all) Moose sugar to make sure it has been cleared $tb->ok($t->can($_) => "$t can $_") for known_sugar; return; } sub does_metaroles_ok($$) { push @_, \&does_ok; goto &_does_metaroles } sub does_not_metaroles_ok($$) { push @_, \&does_not_ok; goto &_does_metaroles } sub _does_metaroles { my ($thing, $metaroles, $test_func) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; my $meta = find_meta($thing); my $name = _thing_name($thing, $meta); for my $mop (sort keys %$metaroles) { my $mop_metaclass = get_mop_metaclass_for $mop => $meta; local $THING_NAME = "${name}'s $mop metaclass $mop_metaclass"; $test_func->($mop_metaclass => $metaroles->{$mop}); } return; } sub validate_thing ($@) { _validate_subtest_wrapper(\&_validate_thing_guts, @_) } sub validate_class ($@) { _validate_subtest_wrapper(\&_validate_class_guts, @_) } sub validate_role ($@) { _validate_subtest_wrapper(\&_validate_role_guts, @_) } sub _validate_subtest_wrapper { my ($func, $thing, %args) = @_; # note incrementing by 2 because of our upper curried function local $Test::Builder::Level = $Test::Builder::Level + 2; # run tests w/o a subtest wrapper... return $func->($thing => %args) unless $args{-subtest}; $args{-subtest} = _thing_name($thing) if "$args{-subtest}" eq '1'; # ...or with one. return $tb->subtest(delete $args{-subtest} => sub { $func->($thing => %args) }); } sub _validate_thing_guts { my ($thing, %args) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; my $meta = find_meta($thing); my $name = _thing_name($thing, $meta); ### anonymous... $args{anonymous} ? is_anon_ok $thing : is_not_anon_ok $thing if exists $args{anonymous}; ### sugar checking... $args{sugar} ? check_sugar_ok $thing : check_sugar_removed_ok $thing if exists $args{sugar}; # metaclass checking for my $mop (sort keys %{ $args{metaclasses} || {} }) { my $mop_metaclass = get_mop_metaclass_for $mop => $meta; local $THING_NAME = "${name}'s $mop metaclass"; validate_class $mop_metaclass => ( -subtest => "Checking the $mop metaclass, $mop_metaclass", %{ $args{metaclasses}->{$mop} }, ); } ### roles... do { does_ok($thing, $_) for @{$args{does}} } if exists $args{does}; do { does_not_ok($thing, $_) for @{$args{does_not}} } if exists $args{does_not}; ### methods... do { has_method_ok($thing, $_) for @{$args{methods}} } if exists $args{methods}; do { has_no_method_ok($thing, $_) for @{$args{no_methods}} } if exists $args{no_methods}; ### attributes... ATTRIBUTE_LOOP: for my $attribute (@{Data::OptList::mkopt($args{attributes} || [])}) { my ($name, $opts) = @$attribute; has_attribute_ok($thing, $name) or next ATTRIBUTE_LOOP; if (!!$opts) { SKIP: { skip 'Cannot examine attribute metaclass in roles', 1 if (find_meta($thing)->isa('Moose::Meta::Role')); local $THING_NAME = _thing_name($thing) . "'s attribute $name"; _validate_attribute(_find_attribute($thing, $name) => ( -subtest => "checking $THING_NAME", %$opts, )); } } } return; } sub _validate_class_guts { my ($class, %args) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; return unless is_class_ok $class; my $meta = find_meta($class); my $name = _thing_name($class, $meta); do { ok($class->isa($_), "$name isa $_") for @{$args{isa}} } if exists $args{isa}; # check our mutability do { is_immutable_ok $class } if exists $args{immutable} && $args{immutable}; do { is_not_immutable_ok $class } if exists $args{immutable} && !$args{immutable}; # metaclass / metarole checking do { does_metaroles_ok $class => $args{class_metaroles} } if exists $args{class_metaroles}; do { does_not_metaroles_ok $class => $args{no_class_metaroles} } if exists $args{no_class_metaroles}; confess 'Cannot specify both a metaclasses and class_metaclasses to validate_class()!' if $args{class_metaclasses} && $args{metaclasses}; $args{metaclasses} = $args{class_metaclasses} if exists $args{class_metaclasses}; return validate_thing $class => %args; } # _validate_role_guts() is where the main logic of validate_role() lives; # we're broken out here so as to allow it all to be easily wrapped -- or not # -- in a subtest. sub _validate_role_guts { my ($role, %args) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; # basic role validation return unless is_role_ok $role; requires_method_ok($role => @{ $args{required_methods} }) if defined $args{required_methods}; role_wraps_before_method_ok($role => @{ $args{before} }) if defined $args{before}; role_wraps_around_method_ok($role => @{ $args{around} }) if defined $args{around}; role_wraps_after_method_ok($role => @{ $args{after} }) if defined $args{after}; # metarole checking do { does_metaroles_ok $role => $args{role_metaroles} } if exists $args{role_metaroles}; do { does_not_metaroles_ok $role => $args{no_role_metaroles} } if exists $args{no_role_metaroles}; confess 'Cannot specify both a metaclasses and role_metaclasses to validate_class()!' if $args{role_metaclasses} && $args{metaclasses}; $args{metaclasses} = $args{role_metaclasses} if exists $args{role_metaclasses}; # if we've been asked to compose ourselves, then do that -- otherwise return $args{-compose} ? validate_thing $role => %args : return validate_thing $role => %args ; # compose it and validate that class. my $anon = Moose::Meta::Class->create_anon_class( roles => [$role], methods => { map { $_ => sub {} } @{ $args{required_methods} || [] } }, ); # take anything in required_methods and put it in methods for this test $args{methods} = defined $args{methods} ? [ @{$args{methods}}, @{$args{required_methods} || []} ] : [ @{$args{required_methods} || []} ] ; delete $args{required_methods}; # and add a test for the role we're actually testing... $args{does} = [ $role, @{ $args{does} || [] } ]; # aaaand a subtest wrapper to make it easier to read... local $THING_NAME = _thing_name($role) . q{'s composed class}; return validate_class $anon->name => ( -subtest => 'role composed into ' . $anon->name, %args, ); } sub _validate_attribute { _validate_subtest_wrapper(\&__validate_attribute_guts, @_) } sub validate_attribute ($$@) { _validate_subtest_wrapper( \&_validate_attribute_guts, [shift, shift], @_) } sub _validate_attribute_guts { my ($thingname, %opts) = @_; my ($thing, $name) = @$thingname; local $Test::Builder::Level = $Test::Builder::Level + 1; return unless has_attribute_ok($thing, $name); my $att = _find_attribute($thing => $name); local $THING_NAME = _thing_name($thing) . "'s attribute $name"; return _validate_attribute($att, %opts); } sub __validate_attribute_guts { my ($att, %opts) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; my %thing_opts = map { $_ => delete $opts{"-$_"} } apply { s/^-// } grep { /^-/ } sort keys %opts ; $thing_opts{does} = [ map { resolve_metatrait_alias(Attribute => $_) } @{$thing_opts{does}} ] if $thing_opts{does}; ### %thing_opts { # If $THING_NAME is set, we're processing an attribute metaclass via # _validate_attribute_guts() or _validate_thing_guts() local $THING_NAME = "${THING_NAME}'s metaclass" if !!$THING_NAME; validate_class $att => %thing_opts if keys %thing_opts; } return _attribute_options_ok($att, %opts); } sub attribute_options_ok ($$@) { my ($thing, $name, %opts) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; return unless has_attribute_ok($thing, $name); my $att = _find_attribute($thing => $name); return _validate_subtest_wrapper(\&_attribute_options_ok => ($att, %opts)); } sub _attribute_options_ok { my ($att, %opts) = @_; goto \&_role_attribute_options_ok if $att->isa('Moose::Meta::Role::Attribute'); goto \&_class_attribute_options_ok; } sub _role_attribute_options_ok { my ($att, %opts) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; my $name = $att->name; my $thing_name = _thing_name($name, $att); exists $opts{required} and delete $opts{required} ? ok($att->is_required, "$thing_name is required") : ok(!$att->is_required, "$thing_name is not required") ; exists $opts{lazy} and delete $opts{lazy} ? ok($att->is_lazy, "$thing_name is lazy") : ok(!$att->is_lazy, "$thing_name is not lazy") ; exists $opts{coerce} and delete $opts{coerce} ? ok( $att->should_coerce, "$thing_name should coerce") : ok(!$att->should_coerce, "$thing_name should not coerce") ; ### for now, skip role attributes: blessed $att return $tb->skip('cannot yet test role attribute layouts') if keys %opts; } sub _class_attribute_options_ok { my ($att, %opts) = @_; my @check_opts = qw{ reader writer accessor predicate default builder clearer }; my @unhandled_opts = qw{ isa does handles traits }; local $Test::Builder::Level = $Test::Builder::Level + 1; my $name = $att->name; my $thing_name = _thing_name($name, $att); # XXX do we really want to do this? if (my $is = delete $opts{is}) { $opts{accessor} = $name if $is eq 'rw' && ! exists $opts{accessor}; $opts{reader} = $name if $is eq 'ro' && ! exists $opts{reader}; } # helper to check an attribute option we expect to be a string, !exist, or # undef my $check = sub { my $property = shift || $_; my $value = delete $opts{$property}; my $has = "has_$property"; # deeper and deeper down the rabbit hole... local $Test::Builder::Level = $Test::Builder::Level + 1; defined $value ? ok($att->$has, "$thing_name has a $property") : ok(!$att->$has, "$thing_name does not have a $property") ; is($att->$property, $value, "$thing_name option $property correct") }; exists $opts{required} and delete $opts{required} ? ok($att->is_required, "$thing_name is required") : ok(!$att->is_required, "$thing_name is not required") ; $check->($_) for grep { any(@check_opts) eq $_ } sort keys %opts; do { $tb->skip("cannot test '$_' options yet", 1); delete $opts{$_} } for grep { exists $opts{$_} } @unhandled_opts; if (exists $opts{init_arg}) { $opts{init_arg} ? $check->('init_arg') : ok(!$att->has_init_arg, "$thing_name has no init_arg") ; delete $opts{init_arg}; } exists $opts{lazy} and delete $opts{lazy} ? ok($att->is_lazy, "$thing_name is lazy") : ok(!$att->is_lazy, "$thing_name is not lazy") ; exists $opts{coerce} and delete $opts{coerce} ? ok( $att->should_coerce, "$thing_name should coerce") : ok(!$att->should_coerce, "$thing_name should not coerce") ; for my $opt (sort keys %opts) { do { fail "unknown attribute option: $opt"; next } unless $att->meta->find_attribute_by_name($opt); $check->($opt); } #fail "unknown attribute option: $_" #for sort keys %opts; return; } !!42; __END__ =pod =encoding UTF-8 =for :stopwords Chris Weyl Chad Etheridge Granum Karen subtest MOPs metaroles =head1 NAME Test::Moose::More - More tools for testing Moose packages =head1 VERSION This document describes version 0.050 of Test::Moose::More - released September 20, 2017 as part of Test-Moose-More. =head1 SYNOPSIS use Test::Moose::More; is_class_ok 'Some::Class'; is_role_ok 'Some::Role'; has_method_ok 'Some::Class', 'foo'; # ... etc =head1 DESCRIPTION This package contains a number of additional tests that can be employed against Moose classes/roles. It is intended to replace L in your tests, and re-exports any tests that it has and we do not, yet. =head2 Export Groups By default, this package exports all test functions. You can be more selective, however, and there are a number of export groups (aside from the default C<:all>) to help you achieve those dreams! =over 4 =item :all All exportable functions. =item :validate L, L, L, L =back =head1 TEST FUNCTIONS =head2 meta_ok $thing Tests C<$thing> to see if it has a metaclass; C<$thing> may be the class name or instance of the class you wish to check. Passes if C<$thing> has a metaclass. =head2 no_meta_ok $thing Tests C<$thing> to see if it does not have a metaclass; C<$thing> may be the class name or instance of the class you wish to check. Passes if C<$thing> does not have a metaclass. =head2 does_ok $thing, < $role | \@roles >, [ $message ] Checks to see if C<$thing> does the given roles. C<$thing> may be the class name or instance of the class you wish to check. Note that the message will be taken verbatim unless it contains C<%s> somewhere; this will be replaced with the name of the role being tested for. =head2 does_not_ok $thing, < $role | \@roles >, [ $message ] Checks to see if C<$thing> does not do the given roles. C<$thing> may be the class name or instance of the class you wish to check. Note that the message will be taken verbatim unless it contains C<%s> somewhere; this will be replaced with the name of the role being tested for. =head2 has_attribute_ok $thing, $attribute_name, [ $message ] Checks C<$thing> for an attribute named C<$attribute_name>; C<$thing> may be a class name, instance, or role name. =head2 has_method_ok $thing, @methods Queries C<$thing>'s metaclass to see if C<$thing> has the methods named in C<@methods>. Note: This does B include inherited methods; see L. =head2 has_no_method_ok $thing, @methods Queries C<$thing>'s metaclass to ensure C<$thing> does not provide the methods named in C<@methods>. Note: This does B include inherited methods; see L. =head2 has_method_from_anywhere_ok $thing, @methods Queries C<$thing>'s metaclass to see if C<$thing> has the methods named in C<@methods>. Note: This B include inherited methods; see L. =head2 has_no_method_from_anywhere_ok $thing, @methods Queries C<$thing>'s metaclass to ensure C<$thing> does not provide the methods named in C<@methods>. Note: This B include inherited methods; see L. =head2 method_from_pkg_ok $thing, $method, $orig_pkg Given a thing (role, class, etc) and a method, test that it originally came from C<$orig_pkg>. =head2 method_not_from_pkg_ok $thing, $method, $orig_pkg Given a thing (role, class, etc) and a method, test that it did not come from C<$orig_pkg>. =head2 method_is_accessor_ok $thing, $method Given a thing (role, class, etc) and a method, test that the method is an accessor -- that is, it descends from L. =head2 method_is_not_accessor_ok $thing, $method Given a thing (role, class, etc) and a method, test that the method is B an accessor -- that is, it does not descend from L. =head2 definition_context_ok $meta, \%dc Validates the definition context of a metaclass instance. This is a strict comparison. =head2 role_wraps_around_method_ok $role, @methods Queries C<$role>'s metaclass to see if C<$role> wraps the methods named in C<@methods> with an around method modifier. =head2 role_wraps_before_method_ok $role, @methods Queries C<$role>'s metaclass to see if C<$role> wraps the methods named in C<@methods> with an before method modifier. =head2 role_wraps_after_method_ok $role, @methods Queries C<$role>'s metaclass to see if C<$role> wraps the methods named in C<@methods> with an after method modifier. =head2 requires_method_ok $thing, @methods Queries C<$thing>'s metaclass to see if C<$thing> requires the methods named in C<@methods>. Note that this really only makes sense if C<$thing> is a role. =head2 does_not_require_method_ok $thing, @methods Queries C<$thing>'s metaclass to ensure C<$thing> does not require the methods named in C<@methods>. Note that this really only makes sense if C<$thing> is a role. =head2 is_immutable_ok $thing Passes if C<$thing> is immutable. =head2 is_not_immutable_ok $thing Passes if C<$thing> is not immutable; that is, is mutable. =head2 is_pristine_ok $thing Passes if C<$thing> is pristine. See L. =head2 is_not_pristine_ok $thing Passes if C<$thing> is not pristine. See L. =head2 is_role_ok $thing Passes if C's> metaclass is a L. =head2 is_class_ok $thing Passes if C's> metaclass is a L. =head2 is_anon_ok $thing Passes if C<$thing> is "anonymous". =head2 is_not_anon_ok $thing Passes if C<$thing> is not "anonymous". =head2 check_sugar_removed_ok $thing Ensures that all the standard Moose sugar is no longer directly callable on a given package. =head2 check_sugar_ok $thing Checks and makes sure a class/etc can still do all the standard Moose sugar. =head2 does_metaroles_ok $thing => { $mop => [ @traits ], ... }; Validate the metaclasses associated with a class/role metaclass. e.g., if I wanted to validate that the attribute trait for L is actually applied, I could do this: { package TestClass; use Moose; use MooseX::AttributeShortcuts; } use Test::Moose::More; use Test::More; does_metaroles_ok TestClass => { attribute => ['MooseX::AttributeShortcuts::Trait::Attribute'], }; done_testing; This function will accept either class or role metaclasses for C<$thing>. The MOPs available for classes (L) are: =over 4 =item class =item attribute =item method =item wrapped_method =item instance =item constructor =item destructor =back The MOPs available for roles (L) are: =over 4 =item role =item attribute =item method =item required_method =item wrapped_method =item conflicting_method =item application_to_class =item application_to_role =item application_to_instance =item applied_attribute =back Note! Neither this function nor C attempts to validate that the MOP type passed in is a member of the above lists. There's no gain here in implementing such a check, and a negative to be had: specifying an invalid MOP type will result in immediate explosions, while it's entirely possible other MOP types will be added (either to core, via traits, or "let's subclass Moose::Meta::Class/etc and implement something new"). =head2 does_not_metaroles_ok $thing => { $mop => [ @traits ], ... }; As with L, but test that the metaroles are not consumed, a la L. =head2 attribute_options_ok Validates that an attribute is set up as expected; like C, but only concerns itself with attribute options. Note that some of these options will skip if used against attributes defined in a role. =over 4 =item * C<< -subtest => 'subtest name...' >> If set, all tests run (save the first, "does this thing even have this attribute?" test) will be wrapped in a subtest, the name of which will be whatever C<-subtest> is set to. =item * C<< is => ro|rw >> Tests for reader/writer options set as one would expect. =item * C<< isa => ... >> Validates that the attribute requires its value to be a given type. =item * C<< does => ... >> Validates that the attribute requires its value to do a given role. =item * C<< builder => '...' >> Validates that the attribute expects the method name given to be its builder. =item * C<< default => ... >> Validates that the attribute has the given default. =item * C<< init_arg => '...' >> Validates that the attribute has the given initial argument name. =item * C<< lazy => 0|1 >> Validates that the attribute is/isn't lazy. =item * C<< required => 0|1 >> Validates that setting the attribute's value is/isn't required. =back =for Pod::Coverage is_anon is_class is_not_anon is_role =head1 VALIDATION METHODS =head2 validate_thing Runs a bunch of tests against the given C<$thing>, as defined: validate_thing $thing => ( attributes => [ ... ], methods => [ ... ], isa => [ ... ], # ensures sugar is/is-not present sugar => 0, # ensures $thing does these roles does => [ ... ], # ensures $thing does not do these roles does_not => [ ... ], ); C<$thing> can be the name of a role or class, an object instance, or a metaclass. =over 4 =item * C<< -subtest => 'subtest name...' >> If set, all tests run will be wrapped in a subtest, the name of which will be whatever C<-subtest> is set to. =item * C<< isa => [ ... ] >> A list of superclasses thing should have. =item * C<< anonymous => 0|1 >> Check to see if the class is/isn't anonymous. =item * C<< does => [ ... ] >> A list of roles the thing should do. =item * C<< does_not => [ ... ] >> A list of roles the thing should not do. =item * C<< attributes => [ ... ] >> The attributes list specified here is in the form of a list of names, each optionally followed by a hashref of options to test the attribute for; this hashref takes the same arguments L does. e.g.: validate_thing $thing => ( attributes => [ 'foo', 'bar', baz => { is => 'ro', ... }, 'bip', ], ); =item * C<< methods => [ ... ] >> A list of methods the thing should have; see L. =item * C<< no_methods => [ ... ] >> A list of methods the thing should not have; see L. =item * C<< sugar => 0|1 >> Ensure that thing can/cannot do the standard Moose sugar. =item * C<< metaclasses => { $mop => { ... }, ... } >> Validates this thing's metaclasses: that is, given a MOP type (e.g. class, attribute, method, ...) and a hashref, find the associated metaclass of the given type and invoke L on it, using the hashref as options for C. e.g. validate_thing 'TestClass' => ( metaclasses => { attribute => { isa => [ 'Moose::Meta::Attribute' ], does => [ 'MetaRole::attribute' ], }, }, ); ...yields: # Subtest: Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1 ok 1 - TestClass's attribute metaclass has a metaclass ok 2 - TestClass's attribute metaclass is a Moose class ok 3 - TestClass's attribute metaclass isa Moose::Meta::Attribute ok 4 - TestClass's attribute metaclass does MetaRole::attribute 1..4 ok 1 - Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1 Note that C and C implement this using C and C, respectively. =back =head2 validate_role The same as C, but ensures C<$thing> is a role, and allows for additional role-specific tests. validate_role $thing => ( required_methods => [ ... ], # ...and all other options from validate_thing() ); =over 4 =item * C<< -compose => 0|1 >> When true, attempt to compose the role into an anonymous class, then use it to run L. The options we're given are passed to C directly, except that any C entry is removed and its contents pushed onto C. (A stub method for each entry in C will also be created in the new class.) e.g.: ok 1 - TestRole has a metaclass ok 2 - TestRole is a Moose role ok 3 - TestRole requires method blargh ok 4 - TestRole does TestRole ok 5 - TestRole does not do TestRole::Two ok 6 - TestRole has method method1 ok 7 - TestRole has an attribute named bar # Subtest: role composed into Moose::Meta::Class::__ANON__::SERIAL::1 ok 1 - TestRole's composed class has a metaclass ok 2 - TestRole's composed class is a Moose class ok 3 - TestRole's composed class does TestRole ok 4 - TestRole's composed class does not do TestRole::Two ok 5 - TestRole's composed class has method method1 ok 6 - TestRole's composed class has method blargh ok 7 - TestRole's composed class has an attribute named bar 1..7 ok 8 - role composed into Moose::Meta::Class::__ANON__::SERIAL::1 1..8 =item * C<< -subtest => 'subtest name...' >> If set, all tests run will be wrapped in a subtest, the name of which will be whatever C<-subtest> is set to. =item * C<< required_methods => [ ... ] >> A list of methods the role requires a consuming class to supply. =item * C<< before => [ ... ] >> A list of methods the role expects to wrap before, on application to a class. See L for information on before method modifiers. =item * C<< around => [ ... ] >> A list of methods the role expects to wrap around, on application to a class. See L for information on around method modifiers. =item * C<< after => [ ... ] >> A list of methods the role expects to wrap after, on application to a class. See L for information on after method modifiers. =item * C<< role_metaroles => { $mop => [ $role, ... ], ... } >> Checks metaclasses to ensure the given metaroles are applied. See L. =item * C<< no_role_metaroles => { $mop => [ $role, ... ], ... } >> Checks metaclasses to ensure the given metaroles are applied. See L. =item * C<< role_metaclasses => { $mop => { ... }, ... } >> Validates this role's metaclasses: that is, given a MOP type (e.g. role, attribute, method, ...) and a hashref, find the associated metaclass of the given type and invoke L on it, using the hashref as options for C. e.g. validate_role 'TestRole' => ( metaclasses => { attribute => { isa => [ 'Moose::Meta::Attribute' ], does => [ 'MetaRole::attribute' ], }, }, ); ...yields: # Subtest: Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1 ok 1 - TestRole's attribute metaclass has a metaclass ok 2 - TestRole's attribute metaclass is a Moose class ok 3 - TestRole's attribute metaclass isa Moose::Meta::Attribute ok 4 - TestRole's attribute metaclass does MetaRole::attribute 1..4 ok 1 - Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1 Note that C and C implement this using C and C, respectively. =item * C<< class_metaclasses => { $mop => { ... }, ... } >> As with role_metaclasses, above, except that this option is only used if C<-compose> is also specified. =back =head2 validate_class The same as C, but ensures C<$thing> is a class, and allows for additional class-specific tests. validate_class $thing => ( isa => [ ... ], attributes => [ ... ], methods => [ ... ], # ensures sugar is/is-not present sugar => 0, # ensures $thing does these roles does => [ ... ], # ensures $thing does not do these roles does_not => [ ... ], # ...and all other options from validate_thing() ); =over 4 =item * C<< -subtest => 'subtest name...' >> If set, all tests run will be wrapped in a subtest, the name of which will be whatever C<-subtest> is set to. =item * C<< immutable => 0|1 >> Checks the class to see if it is/isn't immutable. =item * C<< class_metaroles => { $mop => [ $role, ... ], ... } >> Checks metaclasses to ensure the given metaroles are applied. See L. =item * C<< no_class_metaroles => { $mop => [ $role, ... ], ... } >> Checks metaclasses to ensure the given metaroles are applied. See L. =item * C<< class_metaclasses => { $mop => { ... }, ... } >> Validates this class' metaclasses: that is, given a MOP type (e.g. role, attribute, method, ...) and a hashref, find the associated metaclass of the given type and invoke L on it, using the hashref as options for C. e.g. validate_class 'TestClass' => ( metaclasses => { attribute => { isa => [ 'Moose::Meta::Attribute' ], does => [ 'MetaRole::attribute' ], }, }, ); ...yields: ok 1 - TestClass has a metaclass ok 2 - TestClass is a Moose class # Subtest: Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1 ok 1 - TestClass's attribute metaclass has a metaclass ok 2 - TestClass's attribute metaclass is a Moose class ok 3 - TestClass's attribute metaclass isa Moose::Meta::Attribute ok 4 - TestClass's attribute metaclass does MetaRole::attribute 1..4 ok 3 - Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1 =back =head2 validate_attribute C allows you to test how an attribute looks once built and attached to a class. Let's say you have an attribute defined like this: has foo => ( traits => [ 'TestRole' ], is => 'ro', isa => 'Int', builder => '_build_foo', lazy => 1, ); You can use C to ensure that it's built out in the way you expect: validate_attribute TestClass => foo => ( # tests the attribute metaclass instance to ensure it does the roles -does => [ 'TestRole' ], # tests the attribute metaclass instance's inheritance -isa => [ 'Moose::Meta::Attribute' ], # for demonstration's sake traits => [ 'TestRole' ], isa => 'Int', does => 'Bar', handles => { }, reader => 'foo', builder => '_build_foo', default => undef, init_arg => 'foo', lazy => 1, required => undef, ); Options passed to C prefixed with C<-> test the attribute's metaclass instance rather than a setting on the attribute; that is, C<-does> ensures that the metaclass does a particular role (e.g. L), while C tests the setting of the attribute to require the value do a given role. This function takes all the options L takes, as well as the following: =over 4 =item * C<< -subtest => 'subtest name...' >> If set, all tests run will be wrapped in a subtest, the name of which will be whatever C<-subtest> is set to. =back =head1 SEE ALSO Please see those modules/websites for more information related to this module. =over 4 =item * L =back =head1 BUGS Please report any bugs or feature requests on the bugtracker website L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 AUTHOR Chris Weyl =head1 CONTRIBUTORS =for stopwords Chad Granum Karen Etheridge =over 4 =item * Chad Granum =item * Karen Etheridge =back =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2017, 2016, 2015, 2014, 2013, 2012 by Chris Weyl. This is free software, licensed under: The GNU Lesser General Public License, Version 2.1, February 1999 =cut Test-Moose-More-0.050/xt/0000750000175000017500000000000013160632377015323 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/xt/release/0000750000175000017500000000000013160632377016743 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/xt/release/consistent-version.t0000644000175000017500000000032413160632377023010 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::More; eval "use Test::ConsistentVersion"; plan skip_all => "Test::ConsistentVersion required for this test" if $@; Test::ConsistentVersion::check_consistent_versions(); Test-Moose-More-0.050/xt/release/no-smart-comments.t0000644000175000017500000000531513160632377022524 0ustar rsrchboyrsrchboy#!/usr/bin/env perl # # This file is part of Test-Moose-More # # This software is Copyright (c) 2017, 2016, 2015, 2014, 2013, 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # use strict; use warnings; use Test::More 0.88; eval "use Test::NoSmartComments"; plan skip_all => 'Test::NoSmartComments required for checking comment IQ' if $@; no_smart_comments_in("lib/Test/Moose/More.pm"); no_smart_comments_in("lib/Test/Moose/More/Utils.pm"); no_smart_comments_in("t/00-compile.t"); no_smart_comments_in("t/00-report-prereqs.dd"); no_smart_comments_in("t/00-report-prereqs.t"); no_smart_comments_in("t/attribute_options_ok/basic.t"); no_smart_comments_in("t/attribute_options_ok/subtest-wrapper.t"); no_smart_comments_in("t/check_sugar.t"); no_smart_comments_in("t/definition_context.t"); no_smart_comments_in("t/does_metaroles_ok.t"); no_smart_comments_in("t/does_not_metaroles_ok.t"); no_smart_comments_in("t/does_not_ok.t"); no_smart_comments_in("t/does_ok.t"); no_smart_comments_in("t/has_attribute_ok.t"); no_smart_comments_in("t/is_anon_ok.t"); no_smart_comments_in("t/is_class_ok/basic.t"); no_smart_comments_in("t/is_class_ok/moose-meta-attribute-should-be-moosey.t"); no_smart_comments_in("t/is_immutable_ok.t"); no_smart_comments_in("t/is_not_anon_ok.t"); no_smart_comments_in("t/is_role_ok.t"); no_smart_comments_in("t/meta_ok.t"); no_smart_comments_in("t/method_from_pkg_ok.t"); no_smart_comments_in("t/method_is_accessor_ok.t"); no_smart_comments_in("t/method_is_not_accessor_ok.t"); no_smart_comments_in("t/method_not_from_pkg_ok.t"); no_smart_comments_in("t/method_ok.t"); no_smart_comments_in("t/no_meta_ok.t"); no_smart_comments_in("t/pristine_ok.t"); no_smart_comments_in("t/requires_method_ok.t"); no_smart_comments_in("t/subtest-1.t"); no_smart_comments_in("t/validate_attribute/basic.t"); no_smart_comments_in("t/validate_attribute/coerce.t"); no_smart_comments_in("t/validate_attribute/in_roles.t"); no_smart_comments_in("t/validate_attribute/lazy.t"); no_smart_comments_in("t/validate_attribute/required.t"); no_smart_comments_in("t/validate_class/basic.t"); no_smart_comments_in("t/validate_class/metaclasses.t"); no_smart_comments_in("t/validate_class/metaroles.t"); no_smart_comments_in("t/validate_class/methods.t"); no_smart_comments_in("t/validate_role/basic.t"); no_smart_comments_in("t/validate_role/compose.t"); no_smart_comments_in("t/validate_role/metaclasses.t"); no_smart_comments_in("t/validate_role/metaroles.t"); no_smart_comments_in("t/validate_thing/metaclasses.t"); no_smart_comments_in("t/validate_thing/methods.t"); no_smart_comments_in("t/validate_thing/sugar.t"); no_smart_comments_in("t/wrapped/in_roles.t"); done_testing(); Test-Moose-More-0.050/xt/release/minimum-version.t0000644000175000017500000000065413160632377022300 0ustar rsrchboyrsrchboy#!perl # # This file is part of Test-Moose-More # # This software is Copyright (c) 2017, 2016, 2015, 2014, 2013, 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # use Test::More; eval "use Test::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_ok( qq{5.008008} ); Test-Moose-More-0.050/xt/release/has-version.t0000644000175000017500000000062013160632377021371 0ustar rsrchboyrsrchboy#!perl # # This file is part of Test-Moose-More # # This software is Copyright (c) 2017, 2016, 2015, 2014, 2013, 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # use Test::More; eval "use Test::HasVersion"; plan skip_all => "Test::HasVersion required for testing version numbers" if $@; all_pm_version_ok(); Test-Moose-More-0.050/xt/author/0000750000175000017500000000000013160632377016625 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/xt/author/pod-linkcheck.t0000644000175000017500000000112213160632377021526 0ustar rsrchboyrsrchboy#!perl # # This file is part of Test-Moose-More # # This software is Copyright (c) 2017, 2016, 2015, 2014, 2013, 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_LINKCHECK ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::LinkCheck"; if ( $@ ) { plan skip_all => 'Test::Pod::LinkCheck required for testing POD'; } else { Test::Pod::LinkCheck->new->all_pod_ok; } Test-Moose-More-0.050/xt/author/pod-coverage.t0000644000175000017500000000071713160632377021377 0ustar rsrchboyrsrchboy#!perl # # This file is part of Test-Moose-More # # This software is Copyright (c) 2017, 2016, 2015, 2014, 2013, 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use Test::Pod::Coverage 1.08; use Pod::Coverage::TrustPod; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); Test-Moose-More-0.050/xt/author/pod-syntax.t0000644000175000017500000000063513160632377021131 0ustar rsrchboyrsrchboy#!perl # # This file is part of Test-Moose-More # # This software is Copyright (c) 2017, 2016, 2015, 2014, 2013, 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); Test-Moose-More-0.050/xt/author/pod-spell.t0000644000175000017500000000074513160632377020724 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007004 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ ABEND AFAICT Chad Chris Etheridge Formattable Granum Gratipay Karen Moose More PayPal RSRCHBOY RSRCHBOY's Test Utils Weyl chad codebase coderef cweyl ether formattable gpg implementers ini lib metaclass metaclasses parameterization parameterized subclasses Test-Moose-More-0.050/xt/author/no-tabs.t0000644000175000017500000000323513160632377020365 0ustar rsrchboyrsrchboyuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 use Test::More 0.88; use Test::NoTabs; my @files = ( 'lib/Test/Moose/More.pm', 'lib/Test/Moose/More/Utils.pm', 't/00-check-deps.t', 't/00-compile.t', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/attribute_options_ok/basic.t', 't/attribute_options_ok/subtest-wrapper.t', 't/check_sugar.t', 't/definition_context.t', 't/does_metaroles_ok.t', 't/does_not_metaroles_ok.t', 't/does_not_ok.t', 't/does_ok.t', 't/has_attribute_ok.t', 't/is_anon_ok.t', 't/is_class_ok/basic.t', 't/is_class_ok/moose-meta-attribute-should-be-moosey.t', 't/is_immutable_ok.t', 't/is_not_anon_ok.t', 't/is_role_ok.t', 't/meta_ok.t', 't/method_from_pkg_ok.t', 't/method_is_accessor_ok.t', 't/method_is_not_accessor_ok.t', 't/method_not_from_pkg_ok.t', 't/method_ok.t', 't/no_meta_ok.t', 't/pristine_ok.t', 't/requires_method_ok.t', 't/subtest-1.t', 't/validate_attribute/basic.t', 't/validate_attribute/coerce.t', 't/validate_attribute/in_roles.t', 't/validate_attribute/lazy.t', 't/validate_attribute/required.t', 't/validate_class/basic.t', 't/validate_class/metaclasses.t', 't/validate_class/metaroles.t', 't/validate_class/methods.t', 't/validate_role/basic.t', 't/validate_role/compose.t', 't/validate_role/metaclasses.t', 't/validate_role/metaroles.t', 't/validate_thing/metaclasses.t', 't/validate_thing/methods.t', 't/validate_thing/sugar.t', 't/wrapped/in_roles.t' ); notabs_ok($_) foreach @files; done_testing; Test-Moose-More-0.050/xt/author/eol.t0000644000175000017500000000326713160632377017606 0ustar rsrchboyrsrchboyuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.19 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/Test/Moose/More.pm', 'lib/Test/Moose/More/Utils.pm', 't/00-check-deps.t', 't/00-compile.t', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/attribute_options_ok/basic.t', 't/attribute_options_ok/subtest-wrapper.t', 't/check_sugar.t', 't/definition_context.t', 't/does_metaroles_ok.t', 't/does_not_metaroles_ok.t', 't/does_not_ok.t', 't/does_ok.t', 't/has_attribute_ok.t', 't/is_anon_ok.t', 't/is_class_ok/basic.t', 't/is_class_ok/moose-meta-attribute-should-be-moosey.t', 't/is_immutable_ok.t', 't/is_not_anon_ok.t', 't/is_role_ok.t', 't/meta_ok.t', 't/method_from_pkg_ok.t', 't/method_is_accessor_ok.t', 't/method_is_not_accessor_ok.t', 't/method_not_from_pkg_ok.t', 't/method_ok.t', 't/no_meta_ok.t', 't/pristine_ok.t', 't/requires_method_ok.t', 't/subtest-1.t', 't/validate_attribute/basic.t', 't/validate_attribute/coerce.t', 't/validate_attribute/in_roles.t', 't/validate_attribute/lazy.t', 't/validate_attribute/required.t', 't/validate_class/basic.t', 't/validate_class/metaclasses.t', 't/validate_class/metaroles.t', 't/validate_class/methods.t', 't/validate_role/basic.t', 't/validate_role/compose.t', 't/validate_role/metaclasses.t', 't/validate_role/metaroles.t', 't/validate_thing/metaclasses.t', 't/validate_thing/methods.t', 't/validate_thing/sugar.t', 't/wrapped/in_roles.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; Test-Moose-More-0.050/.travis.yml0000644000175000017500000000067213160632377017013 0ustar rsrchboyrsrchboy# use the container-based infrastructure sudo: false language: perl perl: - "5.8" - "5.10" - "5.12" - "5.14" - "5.16" - "5.18" - "5.20" - "5.22" - "5.24" - "5.26" matrix: allow_failures: - perl: "5.8" - perl: "5.10" - perl: "5.12" - perl: "5.14" before_install: # git bits sometimes needed... - git config user.name 'Travis-CI' - git config user.email 'travis@nowhere.dne' Test-Moose-More-0.050/Makefile.PL0000644000175000017500000000540313160632377016651 0ustar rsrchboyrsrchboy# # This file is part of Test-Moose-More # # This software is Copyright (c) 2017, 2016, 2015, 2014, 2013, 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.010. use strict; use warnings; use 5.006; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "More tools for testing Moose packages", "AUTHOR" => "Chris Weyl ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Test-Moose-More", "LICENSE" => "lgpl", "MIN_PERL_VERSION" => "5.006", "NAME" => "Test::Moose::More", "PREREQ_PM" => { "Carp" => 0, "Data::OptList" => 0, "List::MoreUtils" => 0, "List::Util" => "1.45", "Moose::Util" => 0, "Moose::Util::TypeConstraints" => 0, "Scalar::Util" => 0, "Sub::Exporter::Progressive" => 0, "Syntax::Keyword::Junction" => 0, "Test::Builder" => 0, "Test::Moose" => 0, "Test::More" => "0.94", "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "List::Util" => "1.45", "Moose" => 0, "Moose::Meta::Attribute" => 0, "Moose::Role" => 0, "Moose::Util::MetaRole" => 0, "TAP::SimpleOutput" => "0.009", "Test::Builder::Tester" => 0, "Test::CheckDeps" => "0.010", "Test::More" => "0.94", "namespace::autoclean" => 0 }, "VERSION" => "0.050", "test" => { "TESTS" => "t/*.t t/attribute_options_ok/*.t t/is_class_ok/*.t t/validate_attribute/*.t t/validate_class/*.t t/validate_role/*.t t/validate_thing/*.t t/wrapped/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "Data::OptList" => 0, "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "List::MoreUtils" => 0, "List::Util" => "1.45", "Moose" => 0, "Moose::Meta::Attribute" => 0, "Moose::Role" => 0, "Moose::Util" => 0, "Moose::Util::MetaRole" => 0, "Moose::Util::TypeConstraints" => 0, "Scalar::Util" => 0, "Sub::Exporter::Progressive" => 0, "Syntax::Keyword::Junction" => 0, "TAP::SimpleOutput" => "0.009", "Test::Builder" => 0, "Test::Builder::Tester" => 0, "Test::CheckDeps" => "0.010", "Test::Moose" => 0, "Test::More" => "0.94", "namespace::autoclean" => 0, "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Test-Moose-More-0.050/t/0000750000175000017500000000000013160632377015133 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/t/attribute_options_ok/0000750000175000017500000000000013160632377021402 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/t/attribute_options_ok/subtest-wrapper.t0000644000175000017500000000402613160632377024745 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.009 'counters', ':subtest'; # The sole question this test addresses is: "Does has_attribute_ok()'s # -subtest option work as expected?" As such, there are no role vs class # specific moving parts for us to worry about here. # # Role is included in the "sanity" (aka "what it actually looks like") tests # because the author is lazy, and doesn't really want to have to do it in the # future ;) (aka "may be valuable in debugging") { package TestRole; use Moose::Role; has foo => (is => 'ro'); no Moose } { package TestClass; use Moose; has foo => (is => 'ro'); no Moose } subtest 'sanity run w/subtests' => sub { attribute_options_ok $_ => foo => (is => 'ro', -subtest => "$_ w/subtests") for qw{ TestClass TestRole }; }; subtest 'sanity run w/o subtests' => sub { attribute_options_ok $_ => foo => (is => 'ro') for qw{ TestClass TestRole }; }; note 'test w/-subtest'; { my ($_ok, $_nok, $_skip, $_plan, $_todo, $_freeform) = counters(); test_out $_ok->('TestClass has an attribute named foo'); my $subtest_name = 'TestClass w/subtests'; test_out subtest_header $_freeform => $subtest_name if subtest_header_needed; do { my ($_ok, $_nok, $_skip, $_plan, $_todo, $_freeform) = counters(1); test_out $_ok->('foo has a reader'); test_out $_ok->('foo option reader correct'); test_out $_plan->(); }; test_out $_ok->($subtest_name); attribute_options_ok $_ => foo => (is => 'ro', -subtest => "$_ w/subtests") for 'TestClass'; test_test 'test w/-subtest'; } note 'test w/o subtest'; { my ($_ok, $_nok, $_skip, $_plan, $_todo, $_freeform) = counters(); test_out $_ok->('TestClass has an attribute named foo'); test_out $_ok->('foo has a reader'); test_out $_ok->('foo option reader correct'); attribute_options_ok $_ => foo => (is => 'ro') for 'TestClass'; test_test 'test w/o subtest'; } done_testing; Test-Moose-More-0.050/t/attribute_options_ok/basic.t0000644000175000017500000000453513160632377022664 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.009 'counters'; { package TestRole; use Moose::Role; use namespace::autoclean; has thinger => (is => 'ro', predicate => 'has_thinger'); } { package TestClass; use Moose; use namespace::autoclean; has foo => ( traits => [ 'TestRole' ], required => 1, is => 'ro', isa => 'Int', builder => '_build_foo', lazy => 1, thinger => 'foo', ); } subtest 'a standalone run of attribute_options_ok' => sub { note 'of necessity, these exclude the "failing" tests'; attribute_options_ok TestClass => foo => ( traits => [ 'TestRole' ], isa => 'Int', does => 'Bar', handles => { }, reader => 'foo', builder => '_build_foo', default => undef, init_arg => 'foo', lazy => 1, ); }; note 'attribute_options_ok validation'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestClass has an attribute named foo'); test_out $_ok->('foo has a builder'); test_out $_ok->('foo option builder correct'); test_out $_ok->('foo does not have a default'); test_out $_ok->('foo option default correct'); test_out $_ok->('foo has a reader'); test_out $_ok->('foo option reader correct'); test_out $_skip->("cannot test 'isa' options yet"); test_out $_skip->("cannot test 'does' options yet"); test_out $_skip->("cannot test 'handles' options yet"); test_out $_skip->("cannot test 'traits' options yet"); test_out $_ok->('foo has a init_arg'); test_out $_ok->('foo option init_arg correct'); test_out $_ok->('foo is lazy'); test_out $_nok->('unknown attribute option: binger'); test_fail 3; test_out $_ok->('foo has a thinger'); test_out $_ok->('foo option thinger correct'); attribute_options_ok TestClass => foo => ( traits => [ 'TestRole' ], isa => 'Int', does => 'Bar', handles => { }, reader => 'foo', builder => '_build_foo', default => undef, init_arg => 'foo', lazy => 1, thinger => 'foo', binger => 'bar', ); test_test 'attribute_options_ok works as expected'; } done_testing; Test-Moose-More-0.050/t/method_is_not_accessor_ok.t0000640000175000017500000000207413160632377022532 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::More; use Test::Moose::More; use Test::Builder::Tester; use TAP::SimpleOutput; { package A; use Moose::Role; has a => (is => 'rw'); sub a1 {} } { package B; use Moose; has b => (is => 'rw'); sub b1 {} } { package C; use Moose; extends 'B'; with 'A'; sub c1 {} } subtest standalone => sub { method_is_not_accessor_ok A => 'a1'; method_is_not_accessor_ok B => 'b1'; method_is_not_accessor_ok C => 'a1'; method_is_not_accessor_ok C => 'b1'; }; note 'pass (TBT)'; { my ($_ok, $_nok) = counters; test_out $_ok->(q{B's method b1 is not an accessor method}); method_is_not_accessor_ok B => 'b1'; test_test; } note 'fails - DNE method (TBT)'; { my ($_ok, $_nok) = counters; test_out $_nok->('C has no method dne'); test_fail 1; method_is_not_accessor_ok C => 'dne'; test_test; } note 'fails (TBT)'; { my ($_ok, $_nok) = counters; test_out $_nok->(q{C's method b is not an accessor method}); test_fail 1; method_is_not_accessor_ok C => 'b'; test_test; } done_testing; Test-Moose-More-0.050/t/validate_attribute/0000750000175000017500000000000013160632377021007 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/t/validate_attribute/required.t0000644000175000017500000000455413160632377023031 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; { package TestRole; use Moose::Role; use Moose::Deprecated -api_version => '1.07'; # don't complain use namespace::autoclean; has yes_required => (is => 'ro', required => 1); has no_required => (is => 'ro', required => 0); has null_required => (is => 'ro'); } { package TestClass; use Moose; use Moose::Deprecated -api_version => '1.07'; # don't complain use namespace::autoclean; has yes_required => (is => 'ro', required => 1); has no_required => (is => 'ro', required => 0); has null_required => (is => 'ro'); } note 'finds requiredness correctly'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok, $_skip) = counters(); my $name = 'yes_required'; test_out $_ok->("$thing has an attribute named $name"); test_out $_ok->("${thing}'s attribute $name is required"); test_out $_ok->("$thing has an attribute named $name"); test_out $_nok->("${thing}'s attribute $name is not required"); test_fail 7; test_out $_ok->("$thing has an attribute named $name"); test_out $_nok->("${thing}'s attribute $name is not required"); test_fail 7; validate_attribute $thing => $name => ( required => 1, ); validate_attribute $thing => $name => ( required => 0, ); validate_attribute $thing => $name => ( required => undef, ); test_test "finds requiredness correctly in $thing"; } note 'finds no requiredness correctly'; for my $thing (qw{ TestClass TestRole}) { my ($_ok, $_nok, $_skip) = counters(); my $name = 'no_required'; test_out $_ok->("$thing has an attribute named $name"); test_out $_nok->("${thing}'s attribute $name is required"); test_fail 5; test_out $_ok->("$thing has an attribute named $name"); test_out $_ok->("${thing}'s attribute $name is not required"); test_out $_ok->("$thing has an attribute named $name"); test_out $_ok->("${thing}'s attribute $name is not required"); validate_attribute $thing => $name => ( required => 1, ); validate_attribute $thing => $name => ( required => 0, ); validate_attribute $thing => $name => ( required => undef, ); test_test "finds no requiredness correctly in $thing"; } done_testing; Test-Moose-More-0.050/t/validate_attribute/in_roles.t0000640000175000017500000000236213160632377023012 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.009 'counters'; { package TestRole; use Moose::Role; use namespace::autoclean; has thinger => (is => 'ro', predicate => 'has_thinger'); } subtest 'a standalone run of validate_attribute (thinger)' => sub { validate_attribute TestRole => thinger => ( reader => 'thinger', predicate => 'has_thinger', ); }; { note my $test_title = 'validate_attribute() for a valid role attribute'; my ($_ok, $_nok, $_skip, $_todo, $_other) = counters(); test_out $_ok->('TestRole has an attribute named thinger'); test_out $_skip->('cannot yet test role attribute layouts'); validate_attribute TestRole => thinger => ( reader => 'thinger', predicate => 'has_thinger', ); test_test $test_title; } { note my $test_title = 'validate_attribute() for an invalid role attribute'; my ($_ok, $_nok, $_skip, $_todo, $_other) = counters(); test_out $_nok->('TestRole has an attribute named dne'); test_fail 1; validate_attribute TestRole => dne => ( reader => 'dne', predicate => 'has_dne', ); test_test $test_title; } done_testing; Test-Moose-More-0.050/t/validate_attribute/coerce.t0000644000175000017500000000516013160632377022443 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; use Moose::Util::TypeConstraints; subtype 'AllCaps', as 'Str', where { !m/[a-z]/ }, message { 'String contains some lower-case chars' }; coerce 'AllCaps', from 'Str', via { tr/[a-z]/A-Z]/ }; { package TestRole; use Moose::Role; use Moose::Deprecated -api_version => '1.07'; # don't complain use namespace::autoclean; has yes_coerce => (is => 'ro', isa => 'AllCaps', coerce => 1); has no_coerce => (is => 'ro', isa => 'AllCaps', coerce => 0); has null_coerce => (is => 'ro', isa => 'AllCaps'); } { package TestClass; use Moose; use Moose::Deprecated -api_version => '1.07'; # don't complain use namespace::autoclean; has yes_coerce => (is => 'ro', isa => 'AllCaps', coerce => 1); has no_coerce => (is => 'ro', isa => 'AllCaps', coerce => 0); has null_coerce => (is => 'ro', isa => 'AllCaps'); } note 'finds coercion correctly'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok, $_skip) = counters(); my $name = 'yes_coerce'; test_out $_ok->("$thing has an attribute named $name"); test_out $_ok->("${thing}'s attribute $name should coerce"); test_out $_ok->("$thing has an attribute named $name"); test_out $_nok->("${thing}'s attribute $name should not coerce"); test_fail 7; test_out $_ok->("$thing has an attribute named $name"); test_out $_nok->("${thing}'s attribute $name should not coerce"); test_fail 7; validate_attribute $thing => $name => ( coerce => 1, ); validate_attribute $thing => $name => ( coerce => 0, ); validate_attribute $thing => $name => ( coerce => undef, ); test_test "finds coercion correctly in $thing"; } note 'finds no coercion correctly'; for my $thing (qw{ TestClass TestRole}) { my ($_ok, $_nok, $_skip) = counters(); my $name = 'no_coerce'; test_out $_ok->("$thing has an attribute named $name"); test_out $_nok->("${thing}'s attribute $name should coerce"); test_fail 5; test_out $_ok->("$thing has an attribute named $name"); test_out $_ok->("${thing}'s attribute $name should not coerce"); test_out $_ok->("$thing has an attribute named $name"); test_out $_ok->("${thing}'s attribute $name should not coerce"); validate_attribute $thing => $name => ( coerce => 1, ); validate_attribute $thing => $name => ( coerce => 0, ); validate_attribute $thing => $name => ( coerce => undef, ); test_test "finds no coercion correctly in $thing"; } done_testing; Test-Moose-More-0.050/t/validate_attribute/basic.t0000640000175000017500000000640013160632377022256 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.009 'counters'; { package TestRole; use Moose::Role; use namespace::autoclean; has thinger => (is => 'ro', predicate => 'has_thinger'); } { package TestClass; use Moose; use namespace::autoclean; has foo => ( traits => [ 'TestRole' ], required => 1, is => 'ro', isa => 'Int', builder => '_build_foo', lazy => 1, thinger => 'foo', ); } # initial tests, covering the most straight-forward cases (IMHO) note 'validate attribute validation'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestClass has an attribute named foo'); test_out $_ok->(q{TestClass's attribute foo's metaclass has a metaclass}); test_out $_ok->(q{TestClass's attribute foo's metaclass is a Moose class}); test_out $_ok->(q{TestClass's attribute foo's metaclass isa Moose::Meta::Attribute}); test_out $_ok->(q{TestClass's attribute foo's metaclass does TestRole}); test_out $_ok->(q{TestClass's attribute foo is required}); test_out $_ok->(q{TestClass's attribute foo has a builder}); test_out $_ok->(q{TestClass's attribute foo option builder correct}); test_out $_ok->(q{TestClass's attribute foo does not have a default}); test_out $_ok->(q{TestClass's attribute foo option default correct}); test_out $_ok->(q{TestClass's attribute foo has a reader}); test_out $_ok->(q{TestClass's attribute foo option reader correct}); test_out $_skip->("cannot test 'isa' options yet"); test_out $_skip->("cannot test 'does' options yet"); test_out $_skip->("cannot test 'handles' options yet"); test_out $_skip->("cannot test 'traits' options yet"); test_out $_ok->(q{TestClass's attribute foo has a init_arg}); test_out $_ok->(q{TestClass's attribute foo option init_arg correct}); test_out $_ok->(q{TestClass's attribute foo is lazy}); test_out $_nok->('unknown attribute option: binger'); test_fail 3; test_out $_ok->(q{TestClass's attribute foo has a thinger}); test_out $_ok->(q{TestClass's attribute foo option thinger correct}); validate_attribute TestClass => foo => ( -does => [ 'TestRole' ], -isa => [ 'Moose::Meta::Attribute' ], traits => [ 'TestRole' ], isa => 'Int', does => 'Bar', handles => { }, reader => 'foo', builder => '_build_foo', default => undef, init_arg => 'foo', lazy => 1, required => 1, thinger => 'foo', binger => 'bar', ); test_test 'validate_attribute works correctly'; } subtest 'a standalone run of validate_attribute' => sub { note 'of necessity, these exclude the "failing" tests'; validate_attribute TestClass => foo => ( -does => [ 'TestRole' ], -isa => [ 'Moose::Meta::Attribute' ], traits => [ 'TestRole' ], isa => 'Int', does => 'Bar', handles => { }, reader => 'foo', builder => '_build_foo', default => undef, init_arg => 'foo', required => 1, lazy => 1, thinger => 'foo', ); }; done_testing; Test-Moose-More-0.050/t/validate_attribute/lazy.t0000644000175000017500000000454413160632377022167 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; { package TestRole; use Moose::Role; use Moose::Deprecated -api_version => '1.07'; # don't complain use namespace::autoclean; has yes_lazy => (is => 'ro', default => sub { }, lazy => 1); has no_lazy => (is => 'ro', default => sub { }, lazy => 0); has null_lazy => (is => 'ro', default => sub { }); } { package TestClass; use Moose; use Moose::Deprecated -api_version => '1.07'; # don't complain use namespace::autoclean; has yes_lazy => (is => 'ro', default => sub { }, lazy => 1); has no_lazy => (is => 'ro', default => sub { }, lazy => 0); has null_lazy => (is => 'ro', default => sub { }); } note 'finds lazy correctly'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok, $_skip) = counters(); my $name = 'yes_lazy'; test_out $_ok->("$thing has an attribute named $name"); test_out $_ok->("${thing}'s attribute $name is lazy"); test_out $_ok->("$thing has an attribute named $name"); test_out $_nok->("${thing}'s attribute $name is not lazy"); test_fail 7; test_out $_ok->("$thing has an attribute named $name"); test_out $_nok->("${thing}'s attribute $name is not lazy"); test_fail 7; validate_attribute $thing => $name => ( lazy => 1, ); validate_attribute $thing => $name => ( lazy => 0, ); validate_attribute $thing => $name => ( lazy => undef, ); test_test "finds lazy correctly in $thing"; } note 'finds no lazy correctly'; for my $thing (qw{ TestClass TestRole}) { my ($_ok, $_nok, $_skip) = counters(); my $name = 'no_lazy'; test_out $_ok->("$thing has an attribute named $name"); test_out $_nok->("${thing}'s attribute $name is lazy"); test_fail 5; test_out $_ok->("$thing has an attribute named $name"); test_out $_ok->("${thing}'s attribute $name is not lazy"); test_out $_ok->("$thing has an attribute named $name"); test_out $_ok->("${thing}'s attribute $name is not lazy"); validate_attribute $thing => $name => ( lazy => 1, ); validate_attribute $thing => $name => ( lazy => 0, ); validate_attribute $thing => $name => ( lazy => undef, ); test_test "finds no lazy correctly in $thing"; } done_testing; Test-Moose-More-0.050/t/method_not_from_pkg_ok.t0000640000175000017500000000172013160632377022036 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::More; use Test::Moose::More; use Test::Builder::Tester; use TAP::SimpleOutput; { package A; use Moose::Role; sub a {} } { package B; use Moose; sub b {} } { package C; use Moose; extends 'B'; with 'A'; sub c {} } subtest standalone => sub { method_not_from_pkg_ok C => 'a', 'B'; method_not_from_pkg_ok C => 'b', 'C'; method_not_from_pkg_ok C => 'c', 'A'; }; note 'pass (TBT)'; { my ($_ok, $_nok) = counters; test_out $_ok->(q{C's method b is not from A}); method_not_from_pkg_ok C => 'b', 'A'; test_test; } note 'fails - DNE method (TBT)'; { my ($_ok, $_nok) = counters; test_out $_nok->('C has no method dne'); test_fail 1; method_not_from_pkg_ok C => 'dne', 'A'; test_test; } note 'fails (TBT)'; { my ($_ok, $_nok) = counters; test_out $_nok->(q{C's method a is not from A}); test_fail 1; method_not_from_pkg_ok C => 'a', 'A'; test_test; } done_testing; Test-Moose-More-0.050/t/method_is_accessor_ok.t0000640000175000017500000000202513160632377021646 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::More; use Test::Moose::More; use Test::Builder::Tester; use TAP::SimpleOutput; { package A; use Moose::Role; has a => (is => 'rw'); sub a1 {} } { package B; use Moose; has b => (is => 'rw'); sub b1 {} } { package C; use Moose; extends 'B'; with 'A'; sub c1 {} } subtest standalone => sub { # method_is_accessor_ok A => 'a'; method_is_accessor_ok B => 'b'; method_is_accessor_ok C => 'a'; method_is_accessor_ok C => 'b'; }; note 'pass (TBT)'; { my ($_ok, $_nok) = counters; test_out $_ok->(q{B's method b is an accessor method}); method_is_accessor_ok B => 'b'; test_test; } note 'fails - DNE method (TBT)'; { my ($_ok, $_nok) = counters; test_out $_nok->('C has no method dne'); test_fail 1; method_is_accessor_ok C => 'dne'; test_test; } note 'fails (TBT)'; { my ($_ok, $_nok) = counters; test_out $_nok->(q{C's method b1 is an accessor method}); test_fail 1; method_is_accessor_ok C => 'b1'; test_test; } done_testing; Test-Moose-More-0.050/t/does_not_metaroles_ok.t0000644000175000017500000000627013160632377021710 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose::More; use Test::Moose::More::Utils; use TAP::SimpleOutput 0.009 'counters'; { package TestRole; use Moose::Role; } { package TestClass; use Moose; } use Moose::Util::MetaRole; use List::Util 1.45 'uniq'; my @class_metaclass_types = qw{ class attribute method wrapped_method instance constructor destructor }; # error ?! my @role_metaclass_types = qw{ role attribute method required_method wrapped_method conflicting_method application_to_class application_to_role application_to_instance applied_attribute }; # application_role_summation ?! my %metaroles = map { $_ => Moose::Meta::Role->create("MetaRole::nope::$_" => ()) } uniq sort @class_metaclass_types, @role_metaclass_types, 'nope' ; my %metaclass_types = ( class => [ @class_metaclass_types ], role => [ @role_metaclass_types ], ); Moose::Util::MetaRole::apply_metaroles for => $_, class_metaroles => { map { $_ => [ "MetaRole::nope::$_" ] } @class_metaclass_types }, role_metaroles => { map { $_ => [ "MetaRole::nope::$_" ] } @role_metaclass_types } for qw{ TestClass TestRole } ; my %metaclasses; for my $type (keys %metaclass_types) { my $thing = 'Test' . ucfirst $type; $metaclasses{$type} = { map { $_ => get_mop_metaclass_for($_ => $thing->meta) } @{ $metaclass_types{$type} } }; } # We don't know what names these anonymous classes will be graced with -- they # are anonymous, after all, and we're creating a bunch of them. _msg() is a # helper function to make building the output lines a bit less painful. sub _msg { qq{Test${_[0]}'s $_[1] metaclass } . $metaclasses{lc $_[0]}->{$_[1]} . qq{ does not do MetaRole::} . ($_[2] || $_[1]) } note explain \%metaclasses; # NOTE end prep, begin actual tests subtest 'TestClass via does_not_metaroles_ok' => sub { does_not_metaroles_ok TestClass => { map { $_ => [ "MetaRole::$_" ] } @class_metaclass_types }; }; subtest 'TestRole via does_not_metaroles_ok' => sub { does_not_metaroles_ok TestRole => { map { $_ => [ "MetaRole::$_" ] } @role_metaclass_types }; }; # NOTE begin Test::Builder::Tester tests { # check the output of the two subtests above. (Just more compactly) for my $thing_type (qw{ class role }) { my ($_ok, $_nok) = counters; my $thing = 'Test' . ucfirst $thing_type; test_out $_ok->(_msg ucfirst $thing_type => $_) for sort @{ $metaclass_types{$thing_type} }; does_not_metaroles_ok $thing => { map { $_ => [ "MetaRole::$_" ] } @{ $metaclass_types{$thing_type} } }; test_test "$thing all OK"; } } { # checking for unapplied trait for my $thing_type (qw{ Class Role }) { my ($_ok, $_nok) = counters; my $thing = "Test$thing_type"; test_out $_nok->(_msg $thing_type => 'attribute', 'nope::attribute'); test_fail 1; does_not_metaroles_ok $thing => { attribute => ['MetaRole::nope::attribute'] }; test_test "test for unapplied metarole ($thing)"; } } done_testing; Test-Moose-More-0.050/t/validate_thing/0000750000175000017500000000000013160632377020115 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/t/validate_thing/metaclasses.t0000644000175000017500000000500213160632377022610 0ustar rsrchboyrsrchboyuse strict; use warnings; { package MetaRole::attribute; use Moose::Role; } { package MetaRole::nope; use Moose::Role; } { package TestClass; use Moose; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.008 ':subtest'; use Moose::Util::MetaRole; Moose::Util::MetaRole::apply_metaroles for => 'TestClass', class_metaroles => { attribute => [ 'MetaRole::attribute' ] }; subtest 'Sanity, simple run' => sub { validate_thing 'TestClass' => ( metaclasses => { class => { isa => [ 'Moose::Meta::Class' ], }, attribute => { isa => [ 'Moose::Meta::Attribute' ], does => [ 'MetaRole::attribute' ], }, }, ); }; { my $tap = counters; my ($_ok, $_nok) = @$tap{qw{ ok nok }}; Test::Builder::Tester::_start_testing(); # FIXME damnit. test_out subtest_header $tap, 'Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1' if subtest_header_needed; do { my $tap = counters(1); my ($_ok, $_nok) = @$tap{qw{ ok nok }}; test_out $_ok->(q{TestClass's attribute metaclass has a metaclass}); test_out $_ok->(q{TestClass's attribute metaclass is a Moose class}); test_out $_ok->(q{TestClass's attribute metaclass isa Moose::Meta::Attribute}); test_out $_ok->(q{TestClass's attribute metaclass does MetaRole::attribute}); test_out $tap->{plan}->(); }; test_out $_ok->('Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1'); test_out subtest_header $tap, 'Checking the class metaclass, Moose::Meta::Class' if subtest_header_needed; do { my $tap = counters(1); my ($_ok, $_nok) = @$tap{qw{ ok nok }}; test_out $_ok->(q{TestClass's class metaclass has a metaclass}); test_out $_ok->(q{TestClass's class metaclass is a Moose class}); test_out $_ok->(q{TestClass's class metaclass isa Moose::Meta::Class}); test_out $tap->{plan}->(); }; test_out $_ok->('Checking the class metaclass, Moose::Meta::Class'); validate_thing 'TestClass' => ( metaclasses => { class => { isa => [ 'Moose::Meta::Class' ], }, attribute => { isa => [ 'Moose::Meta::Attribute' ], does => [ 'MetaRole::attribute' ], }, }, ); test_test 'metaclasses option honored'; } done_testing; Test-Moose-More-0.050/t/validate_thing/methods.t0000644000175000017500000000145113160632377021753 0ustar rsrchboyrsrchboyuse strict; use warnings; use Moose::Util 'with_traits'; { package TestClass; use Moose; sub foo { } } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.009; subtest 'validate w/valid class -- standalone run' => sub { validate_thing 'TestClass' => ( methods => [ 'foo' ], no_methods => [ 'bar' ], ); }; note 'validate w/valid class'; { my ($_ok, $_nok) = counters(); test_out $_ok->("TestClass has method $_") for qw{ foo }; test_out $_ok->("TestClass does not have method $_") for qw{ bar }; validate_thing 'TestClass' => ( methods => [ 'foo' ], no_methods => [ 'bar' ], ); test_test 'validate_thing works correctly for valid classes'; } done_testing; __END__ Test-Moose-More-0.050/t/validate_thing/sugar.t0000644000175000017500000000142613160632377021433 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::More; use Test::Moose::More; use Test::Builder::Tester; { package TC1; use Moose; use namespace::autoclean } { package TC2; use Moose; } { package TR1; use Moose::Role; use namespace::autoclean } { package TR2; use Moose::Role; } use TAP::SimpleOutput 0.009 'counters'; sub _validate { my ($thing, $sugar) = @_; my ($_ok, $_nok) = counters(); my $verb = $sugar ? 'can' : 'cannot'; test_out $_ok->("$thing $verb $_") for Test::Moose::More::known_sugar(); validate_thing $thing => (sugar => $sugar); test_test "validate_thing: $thing, sugar => $sugar"; } _validate('TC1', 0); _validate('TC2', 1); _validate('TR1', 0); _validate('TR2', 1); done_testing; Test-Moose-More-0.050/t/validate_class/0000750000175000017500000000000013160632377020111 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/t/validate_class/metaclasses.t0000644000175000017500000000507613160632377022617 0ustar rsrchboyrsrchboyuse strict; use warnings; { package MetaRole::attribute; use Moose::Role; } { package MetaRole::nope; use Moose::Role; } { package TestClass; use Moose; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.008 ':subtest'; use Moose::Util::MetaRole; Moose::Util::MetaRole::apply_metaroles for => 'TestClass', class_metaroles => { attribute => [ 'MetaRole::attribute' ] }; subtest 'Sanity, simple run' => sub { validate_class 'TestClass' => ( class_metaclasses => { class => { isa => [ 'Moose::Meta::Class' ], }, attribute => { isa => [ 'Moose::Meta::Attribute' ], does => [ 'MetaRole::attribute' ], }, }, ); }; { my $tap = counters; my ($_ok, $_nok) = @$tap{qw{ ok nok }}; test_out $_ok->(q{TestClass has a metaclass}); test_out $_ok->(q{TestClass is a Moose class}); test_out subtest_header $tap, 'Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1' if subtest_header_needed; do { my $tap = counters(1); my ($_ok, $_nok) = @$tap{qw{ ok nok }}; test_out $_ok->(q{TestClass's attribute metaclass has a metaclass}); test_out $_ok->(q{TestClass's attribute metaclass is a Moose class}); test_out $_ok->(q{TestClass's attribute metaclass isa Moose::Meta::Attribute}); test_out $_ok->(q{TestClass's attribute metaclass does MetaRole::attribute}); test_out $tap->{plan}->(); }; test_out $_ok->('Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1'); test_out subtest_header $tap, 'Checking the class metaclass, Moose::Meta::Class' if subtest_header_needed; do { my $tap = counters(1); my ($_ok, $_nok) = @$tap{qw{ ok nok }}; test_out $_ok->(q{TestClass's class metaclass has a metaclass}); test_out $_ok->(q{TestClass's class metaclass is a Moose class}); test_out $_ok->(q{TestClass's class metaclass isa Moose::Meta::Class}); test_out $tap->{plan}->(); }; test_out $_ok->('Checking the class metaclass, Moose::Meta::Class'); validate_class 'TestClass' => ( class_metaclasses => { class => { isa => [ 'Moose::Meta::Class' ], }, attribute => { isa => [ 'Moose::Meta::Attribute' ], does => [ 'MetaRole::attribute' ], }, }, ); test_test 'class_metaclasses option honored'; } done_testing; Test-Moose-More-0.050/t/validate_class/metaroles.t0000644000175000017500000000245113160632377022300 0ustar rsrchboyrsrchboyuse strict; use warnings; { package MetaRole::attribute; use Moose::Role; } { package MetaRole::nope; use Moose::Role; } { package TestClass; use Moose; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.009 'counters'; use Moose::Util::MetaRole; Moose::Util::MetaRole::apply_metaroles for => 'TestClass', class_metaroles => { attribute => [ 'MetaRole::attribute' ] }; subtest 'Sanity, simple run' => sub { validate_class 'TestClass' => ( class_metaroles => { attribute => [ 'MetaRole::attribute' ] }, no_class_metaroles => { attribute => [ 'MetaRole::nope' ] }, ); }; { my ($_ok, $_nok) = counters; test_out $_ok->(q{TestClass has a metaclass}); test_out $_ok->(q{TestClass is a Moose class}); test_out $_ok->(q{TestClass's attribute metaclass Moose::Meta::Class::__ANON__::SERIAL::1 does MetaRole::attribute}); test_out $_ok->(q{TestClass's attribute metaclass Moose::Meta::Class::__ANON__::SERIAL::1 does not do MetaRole::nope}); validate_class 'TestClass' => ( class_metaroles => { attribute => [ 'MetaRole::attribute' ] }, no_class_metaroles => { attribute => [ 'MetaRole::nope' ] }, ); test_test '{,no_}class_metaroles option honored'; } done_testing; Test-Moose-More-0.050/t/validate_class/methods.t0000644000175000017500000000161613160632377021752 0ustar rsrchboyrsrchboyuse strict; use warnings; use Moose::Util 'with_traits'; { package TestClass; use Moose; sub foo { } } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.009; subtest 'validate w/valid class -- standalone run' => sub { validate_class 'TestClass' => ( methods => [ 'foo' ], no_methods => [ 'bar' ], ); }; note 'validate w/valid class'; { my ($_ok, $_nok) = counters(); test_out $_ok->('TestClass has a metaclass'); test_out $_ok->('TestClass is a Moose class'); test_out $_ok->("TestClass has method $_") for qw{ foo }; test_out $_ok->("TestClass does not have method $_") for qw{ bar }; validate_class 'TestClass' => ( methods => [ 'foo' ], no_methods => [ 'bar' ], ); test_test 'validate_thing works correctly for valid classes'; } done_testing; __END__ Test-Moose-More-0.050/t/validate_class/basic.t0000640000175000017500000001351713160632377021367 0ustar rsrchboyrsrchboyuse strict; use warnings; use Moose::Util 'with_traits'; { package TestRole; use Moose::Role; } { package TestRole::Two; use Moose::Role; } { package TestClass::Invalid; use Moose; with 'TestRole::Two'; } { package TestClass::NonMoosey; } { package TestClass; use Moose; with 'TestRole'; has foo => (is => 'ro'); has baz => (traits => ['TestRole::Two'], is => 'ro'); sub method1 { } has bar => ( traits => ['Array'], isa => 'ArrayRef', is => 'ro', lazy => 1, builder => '_build_bar', handles => { has_bar => 'count', num_bars => 'count', } ); } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.009 ':subtest'; note 'validate w/valid class'; { my ($_ok, $_nok) = counters(); test_out $_ok->('TestClass has a metaclass'); test_out $_ok->('TestClass is a Moose class'); test_out $_ok->('TestClass isa Moose::Object'); test_out $_ok->('TestClass is not immutable'); test_out $_ok->('TestClass is not anonymous'); test_out $_ok->('TestClass does TestRole'); test_out $_ok->('TestClass does not do TestRole::Two'); test_out $_ok->("TestClass has method $_") for qw{ foo method1 has_bar }; test_out $_ok->('TestClass has an attribute named bar'); validate_class 'TestClass' => ( anonymous => 0, immutable => 0, isa => [ 'Moose::Object' ], attributes => [ 'bar' ], does => [ 'TestRole' ], does_not => [ 'TestRole::Two' ], methods => [ qw{ foo method1 has_bar } ], ); test_test 'validate_class works correctly for valid classes'; } validate_class 'TestClass' => ( -subtest => 'demo/validation of -subtest for validate_class()', attributes => [ 'bar' ], ); subtest 'validate w/valid class -- standalone run' => sub { validate_class 'TestClass' => ( anonymous => 0, immutable => 0, isa => [ 'Moose::Object' ], attributes => [ 'bar' ], does => [ 'TestRole' ], does_not => [ 'TestRole::Two' ], methods => [ qw{ foo method1 has_bar } ], ); }; note 'simple validation w/anonymous_class'; { my $anon = with_traits 'TestClass' => 'TestRole::Two'; my ($_ok, $_nok) = counters(); test_out $_ok->("$anon has a metaclass"); test_out $_ok->("$anon is a Moose class"); test_out $_ok->("$anon is anonymous"); test_out $_ok->("$anon does TestRole::Two"); validate_class $anon => ( anonymous => 1, does => [ qw{ TestRole::Two } ], ); test_test 'simple validation w/anonymous_class'; } note 'simple is-anonymous validation w/anonymous_class'; { my $anon = with_traits 'TestClass' => 'TestRole::Two'; my ($_ok, $_nok) = counters(); test_out $_ok->("$anon has a metaclass"); test_out $_ok->("$anon is a Moose class"); test_out $_nok->("$anon is not anonymous"); test_fail 2; test_out $_ok->("$anon does TestRole::Two"); validate_class $anon => ( anonymous => 0, does => [ qw{ TestRole::Two } ], ); test_test 'simple not-anonymous validation w/anonymous_class'; } note 'validate w/non-moose package'; { my ($_ok, $_nok) = counters(); test_out $_nok->('TestClass::NonMoosey has a metaclass'); test_fail 1; validate_class 'TestClass::NonMoosey' => ( does => [ 'TestRole' ], methods => [ qw{ foo method1 has_bar } ], ); test_test 'validate_class works correctly for non-moose classes'; } note 'validate invalid class'; { my ($_ok, $_nok) = counters(); test_out $_ok->('TestClass::Invalid has a metaclass'); test_out $_ok->('TestClass::Invalid is a Moose class'); test_out $_nok->('TestClass::Invalid does TestRole'); test_fail 6; test_out $_nok->('TestClass::Invalid does not do TestRole::Two'); test_fail 4; do { test_out $_nok->("TestClass::Invalid has method $_"); test_fail 3 } for qw{ foo method1 has_bar }; validate_class 'TestClass::Invalid' => ( does => [ 'TestRole' ], does_not => [ 'TestRole::Two' ], methods => [ qw{ foo method1 has_bar } ], ); test_test 'validate_class works correctly for invalid classes'; } note 'validate w/attribute validation'; { my ($_ok, $_nok, undef, undef, undef, $_any) = counters(); test_out $_ok->('TestClass has a metaclass'); test_out $_ok->('TestClass is a Moose class'); test_out $_ok->('TestClass has an attribute named bar'); test_out $_ok->('TestClass has an attribute named baz'); my $name = q{checking TestClass's attribute baz}; test_out subtest_header $_any => $name if subtest_header_needed; do { my ($_ok, $_nok, $_skip, $_plan, undef, $_any) = counters(1); test_out $_ok->(q{TestClass's attribute baz's metaclass has a metaclass}); test_out $_ok->(q{TestClass's attribute baz's metaclass is a Moose class}); test_out $_ok->(q{TestClass's attribute baz's metaclass does TestRole::Two}); test_out $_ok->(q{TestClass's attribute baz has a reader}); test_out $_ok->(q{TestClass's attribute baz option reader correct}); test_out $_plan->(); }; test_out $_ok->($name); test_out $_ok->('TestClass has an attribute named foo'); validate_class 'TestClass' => ( attributes => [ 'bar', baz => { -does => [ 'TestRole::Two' ], reader => 'baz', }, 'foo', ], ); test_test 'validate_class works correctly for attribute meta checking'; } done_testing; Test-Moose-More-0.050/t/validate_role/0000750000175000017500000000000013160632377017745 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/t/validate_role/metaclasses.t0000644000175000017500000000774313160632377022456 0ustar rsrchboyrsrchboyuse strict; use warnings; { package MetaRole::attribute; use Moose::Role; } { package MetaRole::nope; use Moose::Role; } { package TestRole; use Moose::Role; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.008 ':subtest'; use Moose::Util::MetaRole; # So this is somewhat unfortunate, but it would appear that apply_metaroles() # is not deterministic; that is, it doesn't sort the keys of role_metaroles # before applying them. Normally one probably couldn't care less, however # here Test::Builder::Tester has very strict notions of what "1" and "2" are. # # 0:) Moose::Util::MetaRole::apply_metaroles for => 'TestRole', role_metaroles => { $_ => [ 'MetaRole::attribute' ] } for qw{ attribute applied_attribute } ; subtest 'Sanity, simple run' => sub { validate_role 'TestRole' => ( role_metaclasses => { role => { isa => [ 'Moose::Meta::Role' ], }, applied_attribute => { isa => [ 'Moose::Meta::Attribute' ], does => [ 'MetaRole::attribute' ], }, attribute => { isa => [ 'Moose::Meta::Role::Attribute' ], does => [ 'MetaRole::attribute' ], }, }, ); }; { my $tap = counters; my ($_ok, $_nok) = @$tap{qw{ ok nok }}; test_out $_ok->(q{TestRole has a metaclass}); test_out $_ok->(q{TestRole is a Moose role}); # FIXME either ::1 or ::2, depending on run test_out subtest_header $tap, 'Checking the applied_attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::2' if subtest_header_needed; do { my $tap = counters(1); my ($_ok, $_nok) = @$tap{qw{ ok nok }}; test_out $_ok->(q{TestRole's applied_attribute metaclass has a metaclass}); test_out $_ok->(q{TestRole's applied_attribute metaclass is a Moose class}); test_out $_ok->(q{TestRole's applied_attribute metaclass isa Moose::Meta::Attribute}); test_out $_ok->(q{TestRole's applied_attribute metaclass does MetaRole::attribute}); test_out $tap->{plan}->(); }; test_out $_ok->('Checking the applied_attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::2'); test_out subtest_header $tap, 'Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1' if subtest_header_needed; do { my $tap = counters(1); my ($_ok, $_nok) = @$tap{qw{ ok nok }}; test_out $_ok->(q{TestRole's attribute metaclass has a metaclass}); test_out $_ok->(q{TestRole's attribute metaclass is a Moose class}); test_out $_ok->(q{TestRole's attribute metaclass isa Moose::Meta::Role::Attribute}); test_out $_ok->(q{TestRole's attribute metaclass does MetaRole::attribute}); test_out $tap->{plan}->(); }; test_out $_ok->('Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1'); test_out subtest_header $tap, 'Checking the role metaclass, Moose::Meta::Role' if subtest_header_needed; do { my $tap = counters(1); my ($_ok, $_nok) = @$tap{qw{ ok nok }}; test_out $_ok->(q{TestRole's role metaclass has a metaclass}); test_out $_ok->(q{TestRole's role metaclass is a Moose class}); test_out $_ok->(q{TestRole's role metaclass isa Moose::Meta::Role}); test_out $tap->{plan}->(); }; test_out $_ok->('Checking the role metaclass, Moose::Meta::Role'); validate_role 'TestRole' => ( role_metaclasses => { role => { isa => [ 'Moose::Meta::Role' ], }, applied_attribute => { isa => [ 'Moose::Meta::Attribute' ], does => [ 'MetaRole::attribute' ], }, attribute => { isa => [ 'Moose::Meta::Role::Attribute' ], does => [ 'MetaRole::attribute' ], }, }, ); test_test 'role_metaclasses option honored'; } done_testing; Test-Moose-More-0.050/t/validate_role/metaroles.t0000644000175000017500000000243613160632377022137 0ustar rsrchboyrsrchboyuse strict; use warnings; { package MetaRole::attribute; use Moose::Role; } { package MetaRole::nope; use Moose::Role; } { package TestRole; use Moose::Role; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.007 'counters'; use Moose::Util::MetaRole; Moose::Util::MetaRole::apply_metaroles for => 'TestRole', role_metaroles => { attribute => [ 'MetaRole::attribute' ] }, ; subtest 'Sanity, simple run' => sub { validate_role TestRole => ( role_metaroles => { attribute => [ 'MetaRole::attribute' ] }, no_role_metaroles => { attribute => [ 'MetaRole::nope' ] }, ); }; { my ($_ok, $_nok) = counters; test_out $_ok->(q{TestRole has a metaclass}); test_out $_ok->(q{TestRole is a Moose role}); test_out $_ok->(q{TestRole's attribute metaclass Moose::Meta::Class::__ANON__::SERIAL::1 does MetaRole::attribute}); test_out $_ok->(q{TestRole's attribute metaclass Moose::Meta::Class::__ANON__::SERIAL::1 does not do MetaRole::nope}); validate_role 'TestRole' => ( role_metaroles => { attribute => [ 'MetaRole::attribute' ] }, no_role_metaroles => { attribute => [ 'MetaRole::nope' ] }, ); test_test '{,no_}role_metaroles option honored'; } done_testing; Test-Moose-More-0.050/t/validate_role/compose.t0000644000175000017500000000237213160632377021610 0ustar rsrchboyrsrchboyuse strict; use warnings; # FIXME yup, these aren't real tests, really. { package TestRole::One; use Moose::Role; } { package TestRole::Two; use Moose::Role; } { package TestRole; use Moose::Role; with 'TestRole::One'; has foo => (is => 'ro'); has baz => (traits => ['TestRole::Two'], is => 'ro'); sub method1 { } requires 'blargh'; has bar => ( traits => ['Array'], isa => 'ArrayRef', is => 'ro', lazy => 1, builder => '_build_bar', handles => { has_bar => 'count', num_bars => 'count', } ); } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; validate_role 'TestRole' => ( -compose => 1, attributes => [ bar => { -does => ['Array'], -isa => ['Moose::Meta::Attribute'], is => 'ro', lazy => 1, }, ], does => [ 'TestRole::One' ], does_not => [ 'TestRole::Two' ], methods => [ qw{ method1 } ], required_methods => [ qw{ blargh } ], ); done_testing; __END__ Test-Moose-More-0.050/t/validate_role/basic.t0000644000175000017500000001007113160632377021217 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole::One; use Moose::Role; } { package TestRole::Two; use Moose::Role; } { package TestRole::Invalid; use Moose::Role; with 'TestRole::Two'; } { package TestClass::NonMoosey; } { package TestRole; use Moose::Role; with 'TestRole::One'; has foo => (is => 'ro'); has baz => (traits => ['TestRole::Two'], is => 'ro'); sub method1 { } requires 'blargh'; before before_wrapped => sub { }; around around_wrapped => sub { }; after after_wrapped => sub { }; has bar => ( traits => ['Array'], isa => 'ArrayRef', is => 'ro', lazy => 1, builder => '_build_bar', handles => { has_bar => 'count', num_bars => 'count', } ); } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; validate_role TestRole => ( -subtest => 'simple -subtest demo/validation', methods => [ qw{ method1 } ], ); note 'validate w/valid role'; { my ($_ok, $_nok) = counters(); test_out $_ok->('TestRole has a metaclass'); test_out $_ok->('TestRole is a Moose role'); test_out $_ok->('TestRole requires method blargh'); test_out $_ok->("TestRole wraps before method before_wrapped"); test_out $_ok->("TestRole wraps around method around_wrapped"); test_out $_ok->("TestRole wraps after method after_wrapped"); test_out $_ok->('TestRole does TestRole'); test_out $_ok->('TestRole does not do TestRole::Two'); test_out $_ok->("TestRole has method $_") for qw{ method1 }; test_out $_ok->('TestRole has an attribute named bar'); validate_role 'TestRole' => ( attributes => [ 'bar' ], does => [ 'TestRole' ], does_not => [ 'TestRole::Two' ], # XXX cannot check for accessor methods in a role at the moment #methods => [ qw{ foo method1 has_bar } ], methods => [ qw{ method1 } ], required_methods => [ qw{ blargh } ], before => [ 'before_wrapped' ], around => [ 'around_wrapped' ], after => [ 'after_wrapped' ], ); test_test 'validate_role works correctly for valid roles'; } note 'validate w/non-moose package'; { my ($_ok, $_nok) = counters(); test_out $_nok->('TestClass::NonMoosey has a metaclass'); test_fail 1; validate_role 'TestClass::NonMoosey' => ( does => [ 'TestRole' ], methods => [ qw{ foo method1 has_bar } ], ); test_test 'validate_role works correctly for non-moose classes'; } note 'validate invalid role'; { my ($_ok, $_nok) = counters(); test_out $_ok->('TestRole::Invalid has a metaclass'); test_out $_ok->('TestRole::Invalid is a Moose role'); test_out $_nok->('TestRole::Invalid does TestRole'); test_fail 6; test_out $_nok->('TestRole::Invalid does not do TestRole::Two'); test_fail 4; do { test_out $_nok->("TestRole::Invalid has method $_"); test_fail 3 } for qw{ foo method1 has_bar }; validate_role 'TestRole::Invalid' => ( does => [ 'TestRole' ], does_not => [ 'TestRole::Two' ], methods => [ qw{ foo method1 has_bar } ], ); test_test 'validate_role works correctly for invalid roles'; } note 'validate w/attribute validation'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestRole has a metaclass'); test_out $_ok->('TestRole is a Moose role'); test_out $_ok->('TestRole has an attribute named bar'); test_out $_ok->('TestRole has an attribute named baz'); test_out $_skip->(q{Cannot examine attribute metaclass in roles}); test_out $_ok->('TestRole has an attribute named foo'); validate_role 'TestRole' => ( attributes => [ 'bar', baz => { does => [ 'TestRole::Two' ] }, 'foo' ], ); test_test 'validate_role works correctly for attribute meta checking'; } done_testing; Test-Moose-More-0.050/t/00-report-prereqs.dd0000644000175000017500000000663613160632377020673 0ustar rsrchboyrsrchboydo { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0', 'perl' => '5.006' } }, 'develop' => { 'requires' => { 'Pod::Coverage::TrustPod' => '0', 'Pod::Wordlist' => '0', 'Test::ConsistentVersion' => '0', 'Test::EOL' => '0', 'Test::HasVersion' => '0', 'Test::MinimumVersion' => '0', 'Test::More' => '0.88', 'Test::NoSmartComments' => '0', 'Test::NoTabs' => '0', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.08', 'Test::Pod::LinkCheck' => '0', 'Test::Spelling' => '0.12' } }, 'runtime' => { 'requires' => { 'Carp' => '0', 'Data::OptList' => '0', 'List::MoreUtils' => '0', 'List::Util' => '1.45', 'Moose::Util' => '0', 'Moose::Util::TypeConstraints' => '0', 'Scalar::Util' => '0', 'Sub::Exporter::Progressive' => '0', 'Syntax::Keyword::Junction' => '0', 'Test::Builder' => '0', 'Test::Moose' => '0', 'Test::More' => '0.94', 'perl' => '5.006', 'strict' => '0', 'warnings' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'List::Util' => '1.45', 'Moose' => '0', 'Moose::Meta::Attribute' => '0', 'Moose::Role' => '0', 'Moose::Util::MetaRole' => '0', 'TAP::SimpleOutput' => '0.009', 'Test::Builder::Tester' => '0', 'Test::CheckDeps' => '0.010', 'Test::More' => '0.94', 'namespace::autoclean' => '0', 'perl' => '5.006' } } }; $x; }Test-Moose-More-0.050/t/requires_method_ok.t0000644000175000017500000000203713160632377021217 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole; use Moose::Role; requires 'foo'; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; my $THING = 'TestRole'; subtest 'plain-old tests' => sub { requires_method_ok $THING, 'foo'; does_not_require_method_ok $THING, 'bar'; }; test_out "ok 1 - $THING requires method foo"; requires_method_ok $THING, 'foo'; test_test 'requires_method_ok works correctly with methods'; # is_role_ok vs plain-old-package test_out "not ok 1 - $THING requires method bar"; test_fail(1); requires_method_ok $THING, 'bar'; test_test 'requires_method_ok works correctly with methods not required'; # does not require... test_out "ok 1 - $THING does not require method bar"; does_not_require_method_ok $THING, 'bar'; test_test 'does_not_require_method_ok works correctly with methods'; test_out "not ok 1 - $THING does not require method foo"; test_fail(1); does_not_require_method_ok $THING, 'foo'; test_test 'does_not_require_method_ok works correctly with methods required'; done_testing; Test-Moose-More-0.050/t/method_from_pkg_ok.t0000640000175000017500000000166013160632377021161 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::More; use Test::Moose::More; use Test::Builder::Tester; use TAP::SimpleOutput; { package A; use Moose::Role; sub a {} } { package B; use Moose; sub b {} } { package C; use Moose; extends 'B'; with 'A'; sub c {} } subtest standalone => sub { method_from_pkg_ok C => 'a', 'A'; method_from_pkg_ok C => 'b', 'B'; method_from_pkg_ok C => 'c', 'C'; }; note 'pass (TBT)'; { my ($_ok, $_nok) = counters; test_out $_ok->(q{C's method a is from A}); method_from_pkg_ok C => 'a', 'A'; test_test; } note 'fails - DNE method (TBT)'; { my ($_ok, $_nok) = counters; test_out $_nok->('C has no method dne'); test_fail 1; method_from_pkg_ok C => 'dne', 'A'; test_test; } note 'fails (TBT)'; { my ($_ok, $_nok) = counters; test_out $_nok->(q{C's method b is from A}); test_fail 1; method_from_pkg_ok C => 'b', 'A'; test_test; } done_testing; Test-Moose-More-0.050/t/definition_context.t0000640000175000017500000000440013160632377021213 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::More; use Test::Moose::More ':all'; use Test::Builder::Tester; use TAP::SimpleOutput 0.009 'counters'; { package AAA; use Moose; has foo => ( is => 'ro', ); sub bar { } } subtest 'plain - method' => sub { definition_context_ok(AAA->meta->get_method('foo'), { context => 'has declaration', description => 'reader AAA::foo', line => 13, package => 'AAA', type => 'class', file => __FILE__, }); }; subtest 'plain - attribute' => sub { definition_context_ok(AAA->meta->get_attribute('foo'), { context => 'has declaration', file => __FILE__, line => 13, package => 'AAA', type => 'class' }); }; # NOTE begin Test::Builder::Tester tests { my ($_ok, $_nok) = counters; test_out $_ok->('foo can definition_context()'); test_out $_ok->('foo definition context is strictly correct'); definition_context_ok(AAA->meta->get_attribute('foo'), { context => 'has declaration', file => __FILE__, line => 13, package => 'AAA', type => 'class' }); test_test 'output as expected'; } { my ($_ok, $_nok) = counters; test_out $_ok->('foo can definition_context()'); test_out $_nok->('foo definition context is strictly correct'); test_err q{# Failed test 'foo definition context is strictly correct'}, qr{# at .* line 69.\n}, q{# Structures begin differing at:}, q{# $got->{package} = 'AAA'}, q{# $expected->{package} = 'BBB'}; definition_context_ok(AAA->meta->get_attribute('foo'), { context => 'has declaration', file => __FILE__, line => 13, package => 'BBB', type => 'class' }); test_test 'fail output as expected'; } { my ($_ok, $_nok) = counters; test_out $_nok->('bar can definition_context()'); test_fail 1; definition_context_ok(AAA->meta->get_method('bar'), { context => 'has declaration', file => '-', line => 13, package => 'AAA', type => 'class' }); test_test 'handles no definition_context()'; } done_testing; Test-Moose-More-0.050/t/00-report-prereqs.t0000644000175000017500000001401113160632377020531 0ustar rsrchboyrsrchboy#!perl # # This file is part of Test-Moose-More # # This software is Copyright (c) 2017, 2016, 2015, 2014, 2013, 2012 by Chris Weyl. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if $mod eq 'perl'; next if grep { $_ eq $mod } @exclude; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( $cpan_meta_error || @dep_errors ) { diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; } if ( $cpan_meta_error ) { my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; } if ( @dep_errors ) { diag join("\n", "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=4 sts=4 sw=4 et: Test-Moose-More-0.050/t/is_class_ok/0000750000175000017500000000000013160632377017424 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/t/is_class_ok/moose-meta-attribute-should-be-moosey.t0000644000175000017500000000245313160632377027062 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.009 'counters'; use Moose (); use Moose::Meta::Attribute; # Ok, this is weird, but... Moose::Meta::Attribute fails is_class_ok(). # # Well, maybe not "weird", but unwelcome certainly. # TODO: { # local $TODO = 'Moose::Meta::Attribute is flagged as non-Moosey'; my $class = 'Moose::Meta::Attribute'; subtest "raw $class" => sub { is_class_ok $class }; my ($_ok, $_nok, $_skip, $_todo, $_other) = counters(); test_out $_ok->("$class has a metaclass"); test_out $_ok->("$class is a Moose class"); is_class_ok $class; test_test $class; # } done_testing; __END__ # is_class_ok vs role test_out 'ok 1 - TestRole has a metaclass'; test_out 'not ok 2 - TestRole is a Moose class'; test_fail(1); is_class_ok 'TestRole'; test_test 'is_class_ok works correctly'; # is_class_ok vs class test_out 'ok 1 - TestClass has a metaclass'; test_out 'ok 2 - TestClass is a Moose class'; is_class_ok 'TestClass'; test_test 'is_class_ok works correctly with classes'; # is_class_ok vs plain-old-package test_out 'not ok 1 - TestClass::NotMoosey has a metaclass'; test_fail(1); is_class_ok 'TestClass::NotMoosey'; test_test 'is_class_ok works correctly with plain-old-packages'; done_testing; Test-Moose-More-0.050/t/is_class_ok/basic.t0000644000175000017500000000152313160632377020700 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole; use Moose::Role; } { package TestClass; use Moose; } { package TestClass::NotMoosey; } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; # is_class_ok vs role test_out 'ok 1 - TestRole has a metaclass'; test_out 'not ok 2 - TestRole is a Moose class'; test_fail(1); is_class_ok 'TestRole'; test_test 'is_class_ok works correctly'; # is_class_ok vs class test_out 'ok 1 - TestClass has a metaclass'; test_out 'ok 2 - TestClass is a Moose class'; is_class_ok 'TestClass'; test_test 'is_class_ok works correctly with classes'; # is_class_ok vs plain-old-package test_out 'not ok 1 - TestClass::NotMoosey has a metaclass'; test_fail(1); is_class_ok 'TestClass::NotMoosey'; test_test 'is_class_ok works correctly with plain-old-packages'; done_testing; Test-Moose-More-0.050/t/does_metaroles_ok.t0000644000175000017500000000616113160632377021027 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Test::More; use Test::Moose::More; use Test::Moose::More::Utils; use TAP::SimpleOutput 0.009 'counters'; { package TestRole; use Moose::Role; } { package TestClass; use Moose; } use Moose::Util::MetaRole; use List::Util 1.45 'uniq'; my @class_metaclass_types = qw{ class attribute method wrapped_method instance constructor destructor }; # error ?! my @role_metaclass_types = qw{ role attribute method required_method wrapped_method conflicting_method application_to_class application_to_role application_to_instance applied_attribute }; # application_role_summation ?! my %metaroles = map { $_ => Moose::Meta::Role->create("MetaRole::$_" => ()) } uniq sort @class_metaclass_types, @role_metaclass_types, 'nope' ; my %metaclass_types = ( class => [ @class_metaclass_types ], role => [ @role_metaclass_types ], ); Moose::Util::MetaRole::apply_metaroles for => $_, class_metaroles => { map { $_ => [ "MetaRole::$_" ] } @class_metaclass_types }, role_metaroles => { map { $_ => [ "MetaRole::$_" ] } @role_metaclass_types } for qw{ TestClass TestRole } ; my %metaclasses; for my $type (keys %metaclass_types) { my $thing = 'Test' . ucfirst $type; $metaclasses{$type} = { map { $_ => get_mop_metaclass_for($_ => $thing->meta) } @{ $metaclass_types{$type} } }; } # We don't know what names these anonymous classes will be graced with -- they # are anonymous, after all, and we're creating a bunch of them. _msg() is a # helper function to make building the output lines a bit less painful. sub _msg { qq{Test${_[0]}'s $_[1] metaclass } . $metaclasses{lc $_[0]}->{$_[1]} . qq{ does MetaRole::} . ($_[2] || $_[1]) } note explain \%metaclasses; # NOTE end prep, begin actual tests subtest 'TestClass via does_metaroles_ok' => sub { does_metaroles_ok TestClass => { map { $_ => [ "MetaRole::$_" ] } @class_metaclass_types }; }; subtest 'TestRole via does_metaroles_ok' => sub { does_metaroles_ok TestRole => { map { $_ => [ "MetaRole::$_" ] } @role_metaclass_types }; }; # NOTE begin Test::Builder::Tester tests { # check the output of the two subtests above. (Just more compactly) for my $thing_type (qw{ class role }) { my ($_ok, $_nok) = counters; my $thing = 'Test' . ucfirst $thing_type; test_out $_ok->(_msg ucfirst $thing_type => $_) for sort @{ $metaclass_types{$thing_type} }; does_metaroles_ok $thing => { map { $_ => [ "MetaRole::$_" ] } @{ $metaclass_types{$thing_type} } }; test_test "$thing all OK"; } } { # checking for unapplied trait for my $thing_type (qw{ Class Role }) { my ($_ok, $_nok) = counters; my $thing = "Test$thing_type"; test_out $_nok->(_msg $thing_type => 'attribute', 'nope'); test_fail 1; does_metaroles_ok $thing => { attribute => ['MetaRole::nope'] }; test_test "test for unapplied metarole ($thing)"; } } done_testing; Test-Moose-More-0.050/t/wrapped/0000750000175000017500000000000013160632377016575 5ustar rsrchboyrsrchboyTest-Moose-More-0.050/t/wrapped/in_roles.t0000644000175000017500000000322613160632377020604 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Moose::Util 'with_traits'; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; { package TestRole; use Moose::Role; around hiya => sub { }; before there => sub { }; after sailor => sub { }; } subtest 'sanity checks of the tests themselves' => sub { role_wraps_around_method_ok 'TestRole' => 'hiya'; role_wraps_before_method_ok 'TestRole' => 'there'; role_wraps_after_method_ok 'TestRole' => 'sailor'; }; { note 'role_wraps_around_method_ok'; my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestRole wraps around method hiya'); test_out $_nok->('TestRole wraps around method sailor'); test_fail(2); role_wraps_around_method_ok 'TestRole' => 'hiya'; role_wraps_around_method_ok 'TestRole' => 'sailor'; test_test 'role_wraps_around_method_ok OK'; } { note 'role_wraps_before_method_ok'; my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestRole wraps before method there'); test_out $_nok->('TestRole wraps before method sailor'); test_fail(2); role_wraps_before_method_ok 'TestRole' => 'there'; role_wraps_before_method_ok 'TestRole' => 'sailor'; test_test 'role_wraps_before_method_ok OK'; } { note 'role_wraps_after_method_ok'; my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestRole wraps after method sailor'); test_out $_nok->('TestRole wraps after method hiya'); test_fail(2); role_wraps_after_method_ok 'TestRole' => 'sailor'; role_wraps_after_method_ok 'TestRole' => 'hiya'; test_test 'role_wraps_after_method_ok OK'; } done_testing; Test-Moose-More-0.050/t/has_attribute_ok.t0000644000175000017500000001053013160632377020653 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole; use Moose::Role; has foo => (is => 'ro'); } { package TestClass; use Moose; has foo => (is => 'ro'); } { package TestRole::Fail; use Moose::Role; with 'TestRole'; } { package TestClass::Fail; use Moose; with 'TestRole'; } { package TestClass::NotMoosey; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; use Scalar::Util 'blessed'; use TAP::SimpleOutput 'counters'; my @THINGS = (TestClass->new(), qw{ TestClass TestRole }); my @FAILS = (qw{ TestClass::Fail TestRole::Fail }); note 'default message - OK'; for my $thing (@THINGS) { my $att = 'foo'; my $thing_name = blessed $thing || $thing; my ($_ok, $_nok) = counters(); test_out $_ok->("$thing_name has an attribute named $att"); has_attribute_ok $thing, $att; test_test "$thing is found to have attribute $att correctly"; } note 'custom message - OK'; for my $thing (@THINGS) { my $att = 'foo'; my $thing_name = blessed $thing || $thing; my ($_ok, $_nok) = counters(); test_out $_ok->('whee!'); has_attribute_ok $thing, $att, 'whee!'; test_test "$thing is found to have attribute $att correctly"; } note 'default message - NOK'; for my $thing (@FAILS) { my $att = 'bar'; my $thing_name = blessed $thing || $thing; my ($_ok, $_nok) = counters(); test_out $_nok->("$thing_name has an attribute named $att"); test_fail 1; has_attribute_ok $thing, $att; test_test "$thing is found to not have attribute $att correctly"; } note 'custom message - NOK'; for my $thing (@FAILS) { my $att = 'bar'; my $thing_name = blessed $thing || $thing; my ($_ok, $_nok) = counters(); test_out $_nok->('whee!'); test_fail 1; has_attribute_ok $thing, $att, 'whee!'; test_test "$thing is found to not have attribute $att correctly"; } done_testing; __END__ note 'single role, custom message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->('wah-wah'); does_ok $thing, $ROLE, 'wah-wah'; test_test "$thing: custom messages work as expected"; } note 'single role, "complex" custom message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->("wah-wah $ROLE"); does_ok $thing, $ROLE, 'wah-wah %s'; test_test "$thing: 'complex' custom messages work as expected"; } note 'multiple roles, default message - OK'; for my $thing (qw{ TestClass::Two TestRole::Two }) { # role - OK my ($_ok, $_nok) = counters(); test_out $_ok->("$thing does $_") for @ROLES; does_ok $thing, [ @ROLES ]; test_test "$thing is found to do the roles correctly"; } note 'multiple roles, custom message - OK'; for my $thing (qw{ TestClass::Two TestRole::Two }) { # role - OK my ($_ok, $_nok) = counters(); my $msg = 'wah-wah'; test_out $_ok->($msg) for @ROLES; does_ok $thing, [ @ROLES ], $msg; test_test "$thing: multiple roles, custom messages work as expected"; } note 'multiple roles, "complex" custom message - OK'; for my $thing (qw{ TestClass::Two TestRole::Two }) { # role - OK my ($_ok, $_nok) = counters(); my $msg = 'wah-wah'; test_out $_ok->("$msg $_") for @ROLES; does_ok $thing, [ @ROLES ], "$msg %s"; test_test "$thing: multiple roles, 'complex' custom messages work as expected"; } note 'role - NOT OK'; for my $thing (qw{ TestClass::Fail TestRole::Fail }) { # role - NOT OK my ($_ok, $_nok) = counters(); test_out $_nok->("$thing does $ROLE"); test_fail 1; does_ok $thing, $ROLE; test_test "$thing is found to not do $ROLE correctly"; } note 'multiple roles - NOT OK'; for my $thing (qw{ TestClass::Fail TestRole::Fail }) { # role - OK my ($_ok, $_nok) = counters(); do { test_out $_nok->("$thing does $_"); test_fail 1 } for @ROLES; does_ok $thing, [ @ROLES ]; test_test "$thing: multiple roles fail as expected"; } note 'multiple roles - PARTIALLY OK'; for my $thing (qw{ TestClass::Fail2 TestRole::Fail2 }) { # role - OK my ($_ok, $_nok) = counters(); do { test_out $_nok->("$thing does $_"); test_fail 2 } for $ROLES[0]; do { test_out $_ok->("$thing does $_") } for $ROLES[1]; does_ok $thing, [ @ROLES ]; test_test "$thing: multiple roles partially fail as expected"; } done_testing; Test-Moose-More-0.050/t/is_immutable_ok.t0000644000175000017500000000234513160632377020474 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestClass; use Moose; __PACKAGE__->meta->make_immutable; } { package TestClass::Mutable; use Moose; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 0.009 'counters'; # immutable class, is_immutable_ok { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestClass is immutable'); is_immutable_ok 'TestClass'; test_test 'is_immutable_ok, immutable class'; } # mutable class, is_immutable_ok { my ($_ok, $_nok, $_skip) = counters(); test_out $_nok->('TestClass::Mutable is immutable'); test_fail 1; is_immutable_ok 'TestClass::Mutable'; test_test 'is_immutable_ok, mutable class'; } # mutable class, is_not_immutable_ok { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestClass::Mutable is not immutable'); is_not_immutable_ok 'TestClass::Mutable'; test_test 'is_not_immutable_ok, mutable class'; } # immutable class, is_not_immutable_ok { my ($_ok, $_nok, $_skip) = counters(); test_out $_nok->('TestClass is not immutable'); test_fail 1; is_not_immutable_ok 'TestClass'; test_test 'is_not_immutable_ok, immutable class'; } done_testing; Test-Moose-More-0.050/t/is_not_anon_ok.t0000644000175000017500000000256513160632377020334 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Moose::Util 'with_traits'; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; { package TestRole; use Moose::Role; use namespace::autoclean; } { package TestClass; use Moose; } # initial tests, covering the most straight-forward cases (IMHO) my $anon_class = with_traits('TestClass' => 'TestRole'); my $anon_role = Moose::Meta::Role ->create_anon_role(weaken => 0) ->name ; note 'simple anon class'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_nok->("$anon_class is not anonymous"); test_fail 1; is_not_anon_ok $anon_class; test_test 'is_not_anon_ok works correctly on anon class'; } note 'simple anon role'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_nok->("$anon_role is not anonymous"); test_fail 1; is_not_anon_ok $anon_role; test_test 'is_not_anon_ok works correctly on anon role'; } note 'simple !anon class'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestClass is not anonymous'); is_not_anon_ok 'TestClass'; test_test 'is_not_anon_ok works correctly on !anon class'; } note 'simple !anon role'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->('TestRole is not anonymous'); is_not_anon_ok 'TestRole'; test_test 'is_not_anon_ok works correctly on !anon role'; } done_testing; Test-Moose-More-0.050/t/00-check-deps.t0000644000175000017500000000043613160632377017553 0ustar rsrchboyrsrchboyuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CheckDeps 0.014 use Test::More 0.94; use Test::CheckDeps 0.010; check_dependencies('suggests'); if (1) { BAIL_OUT("Missing dependencies") if !Test::More->builder->is_passing; } done_testing; Test-Moose-More-0.050/t/pristine_ok.t0000644000175000017500000000062413160632377017655 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::More; use Test::Moose::More; { package Pristine; use Moose; } { package NotPristine; use Moose; has foo => (is => 'rw'); } { package AlsoPristine; use Moose; extends 'NotPristine' } subtest 'sanity' => sub { is_pristine_ok 'Pristine'; is_not_pristine_ok 'NotPristine'; is_pristine_ok 'AlsoPristine'; }; done_testing; Test-Moose-More-0.050/t/does_not_ok.t0000644000175000017500000001002213160632377017623 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole::Role; use Moose::Role; } { package TestRole::Role2; use Moose::Role; } { package TestRole::Fail; use Moose::Role; with 'TestRole::Role'; with 'TestRole::Role2'; } { package TestClass::Fail; use Moose; with 'TestRole::Role'; with 'TestRole::Role2'; } { package TestRole; use Moose::Role; } { package TestClass; use Moose; } { package TestRole::Fail2; use Moose::Role; with 'TestRole::Role'; } { package TestClass::Fail2; use Moose; with 'TestRole::Role'; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; my $ROLE = 'TestRole::Role'; my @ROLES = qw{ TestRole::Role TestRole::Role2 }; note 'single role, default message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->("$thing does not do $ROLE"); does_not_ok $thing, $ROLE; test_test "$thing is found to not do $ROLE correctly"; } note 'single role, custom message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->('wah-wah'); does_not_ok $thing, $ROLE, 'wah-wah'; test_test "$thing: custom messages work as expected"; } note 'single role, "complex" custom message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->("wah-wah $ROLE"); does_not_ok $thing, $ROLE, 'wah-wah %s'; test_test "$thing: 'complex' custom messages work as expected"; } note 'multiple roles, default message - OK'; for my $thing (qw{ TestClass TestRole }) { # role - OK my ($_ok, $_nok) = counters(); test_out $_ok->("$thing does not do $_") for @ROLES; does_not_ok $thing, [ @ROLES ]; test_test "$thing is found to not do the roles correctly"; } note 'multiple roles, custom message - OK'; for my $thing (qw{ TestClass TestRole }) { # role - OK my ($_ok, $_nok) = counters(); my $msg = 'wah-wah'; test_out $_ok->($msg) for @ROLES; does_not_ok $thing, [ @ROLES ], $msg; test_test "$thing: multiple roles, custom messages work as expected"; } note 'multiple roles, "complex" custom message - OK'; for my $thing (qw{ TestClass TestRole }) { # role - OK my ($_ok, $_nok) = counters(); my $msg = 'wah-wah'; test_out $_ok->("$msg $_") for @ROLES; does_not_ok $thing, [ @ROLES ], "$msg %s"; test_test "$thing: multiple roles, 'complex' custom messages work as expected"; } note 'role - NOT OK'; for my $thing (qw{ TestClass::Fail TestRole::Fail }) { # role - NOT OK my ($_ok, $_nok) = counters(); test_out $_nok->("$thing does not do $ROLE"); test_fail 1; does_not_ok $thing, $ROLE; test_test "$thing is found to not do $ROLE correctly"; } note 'multiple roles - NOT OK'; for my $thing (qw{ TestClass::Fail TestRole::Fail }) { # role - OK my ($_ok, $_nok) = counters(); do { test_out $_nok->("$thing does not do $_"); test_fail 1 } for @ROLES; does_not_ok $thing, [ @ROLES ]; test_test "$thing: multiple roles fail as expected"; } note 'multiple roles - PARTIALLY OK'; for my $thing (qw{ TestClass::Fail2 TestRole::Fail2 }) { # role - OK my ($_ok, $_nok) = counters(); do { test_out $_nok->("$thing does not do $_"); test_fail 2 } for $ROLES[0]; do { test_out $_ok->("$thing does not do $_") } for $ROLES[1]; does_not_ok $thing, [ @ROLES ]; test_test "$thing: multiple roles partially fail as expected"; } note 'Class::MOP metaclass'; my $cmop_thing = 'TestClass::CMOP'; my $cmop_meta = Class::MOP::Class->create($cmop_thing => (methods => { foo => sub { 1 } })); { my ($_ok, $_nok) = counters(); test_out $_ok->("$cmop_thing does not do $ROLE"); does_not_ok $cmop_thing => $ROLE; test_test q{Class::MOP metaclasses don't ever do roles}; } done_testing; Test-Moose-More-0.050/t/check_sugar.t0000644000175000017500000000300113160632377017575 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestClass; use Moose; } { package TestClass::NotCleaned; use Moose; no Moose; } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; # not ok 1 - TestRole can has # not ok 2 - TestRole can around # not ok 3 - TestRole can augment # not ok 4 - TestRole can inner # not ok 5 - TestRole can before # not ok 6 - TestRole can after # not ok 7 - TestRole can blessed # not ok 8 - TestRole can confess # check for sugar in a class that still has it my $i; do { $i++; test_out "ok $i - TestClass can $_" } for Test::Moose::More::known_sugar(); check_sugar_ok 'TestClass'; test_test 'check_sugar_ok works correctly'; # check for sugar in a class that has none $i = 0; do { $i++; test_out "not ok $i - TestClass::NotCleaned can $_"; test_fail(2) } for Test::Moose::More::known_sugar(); check_sugar_ok 'TestClass::NotCleaned'; test_test 'check_sugar_ok works correctly on classes without sugar'; # check for no sugar in a class that still has it $i = 0; do { $i++; test_out "not ok $i - TestClass cannot $_"; test_fail(2) } for Test::Moose::More::known_sugar(); check_sugar_removed_ok 'TestClass'; test_test 'check_sugar_removed_ok works correctly with sugar'; # check for no sugar in a class that has none $i = 0; do { $i++; test_out "ok $i - TestClass::NotCleaned cannot $_" } for Test::Moose::More::known_sugar(); check_sugar_removed_ok 'TestClass::NotCleaned'; test_test 'check_sugar_removed_ok works correctly w/o sugar'; done_testing; Test-Moose-More-0.050/t/00-compile.t0000644000175000017500000000270013160632377017171 0ustar rsrchboyrsrchboyuse 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.057 use Test::More; plan tests => 2 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'Test/Moose/More.pm', 'Test/Moose/More/Utils.pm' ); # no fake home requested my @switches = ( -d 'blib' ? '-Mblib' : '-Ilib', ); use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } $^X, @switches, '-e', "require q[$lib]")) if $ENV{PERL_COMPILE_TEST_DEBUG}; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { +require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; Test-Moose-More-0.050/t/no_meta_ok.t0000640000175000017500000000140013160632377017427 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole; use Moose::Role; } { package TestClass; use Moose; } { package TestClass::Fail; } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; my $ROLE = 'TestRole::Role'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_nok->("$thing does not have a meta"); test_fail 1; no_meta_ok $thing; test_test "$thing is found to have a metaclass correctly"; } for my $thing (qw{ TestClass::Fail }) { my ($_ok, $_nok) = counters(); test_out $_ok->("$thing does not have a meta"); no_meta_ok $thing; test_test "$thing is found to not have a metaclass correctly"; } done_testing; Test-Moose-More-0.050/t/is_role_ok.t0000644000175000017500000000151013160632377017447 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole; use Moose::Role; } { package TestClass; use Moose; } { package TestClass::NotMoosey; } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; # is_role_ok vs role test_out 'ok 1 - TestRole has a metaclass'; test_out 'ok 2 - TestRole is a Moose role'; is_role_ok 'TestRole'; test_test 'is_role_ok works correctly'; # is_role_ok vs class test_out 'ok 1 - TestClass has a metaclass'; test_out 'not ok 2 - TestClass is a Moose role'; test_fail(1); is_role_ok 'TestClass'; test_test 'is_role_ok works correctly with classes'; # is_role_ok vs plain-old-package test_out 'not ok 1 - TestClass::NotMoosey has a metaclass'; test_fail(1); is_role_ok 'TestClass::NotMoosey'; test_test 'is_role_ok works correctly with plain-old-packages'; done_testing; Test-Moose-More-0.050/t/is_anon_ok.t0000644000175000017500000000250513160632377017446 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::Builder::Tester; use Moose::Util 'with_traits'; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; { package TestRole; use Moose::Role; use namespace::autoclean; } { package TestClass; use Moose; } # initial tests, covering the most straight-forward cases (IMHO) my $anon_class = with_traits('TestClass' => 'TestRole'); my $anon_role = Moose::Meta::Role ->create_anon_role(weaken => 0) ->name ; note 'simple anon class'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->("$anon_class is anonymous"); is_anon_ok $anon_class; test_test 'is_anon_ok works correctly on anon class'; } note 'simple anon role'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_ok->("$anon_role is anonymous"); is_anon_ok $anon_role; test_test 'is_anon_ok works correctly on anon role'; } note 'simple !anon class'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_nok->('TestClass is anonymous'); test_fail 1; is_anon_ok 'TestClass'; test_test 'is_anon_ok works correctly on !anon class'; } note 'simple !anon role'; { my ($_ok, $_nok, $_skip) = counters(); test_out $_nok->('TestRole is anonymous'); test_fail 1; is_anon_ok 'TestRole'; test_test 'is_anon_ok works correctly on !anon role'; } done_testing; Test-Moose-More-0.050/t/subtest-1.t0000644000175000017500000000167413160632377017164 0ustar rsrchboyrsrchboyuse strict; use warnings; use Test::More; use Test::Moose::More; use Test::Builder::Tester; use TAP::SimpleOutput 0.009 'counters', ':subtest'; { package A; use Moose } subtest checking => sub { validate_class A => (-subtest => 1); local $Test::Moose::More::THING_NAME = 'hi guys!'; validate_class A => (-subtest => 1); }; note '-subtest => 1 (TBT)'; { my ($_ok, $_nok, $_skip, $_plan, $_todo, $_freeform) = counters(); my $subtest_name = 'A'; test_out $_ok->('argh TBT'); test_out subtest_header $_freeform => $subtest_name if subtest_header_needed; do { my ($_ok, $_nok, $_skip, $_plan, $_todo, $_freeform) = counters(1); test_out $_ok->('A has a metaclass'); test_out $_ok->('A is a Moose class'); test_out $_plan->(); }; test_out $_ok->($subtest_name); pass 'argh TBT'; validate_class A => (-subtest => 1); test_test 'test w/-subtest'; } done_testing; Test-Moose-More-0.050/t/method_ok.t0000644000175000017500000001121513160632377017276 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole; use Moose::Role; sub role {}; has role_att => (is => 'ro') } { package TestRole2; use Moose::Role; with 'TestRole'; } { package TestClass; use Moose; sub foo {}; sub baz {}; has beep => (is => 'ro') } { package TC2; use Moose; extends 'TestClass'; with 'TestRole'; sub bar {} } use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput; subtest strict => sub { # This seems somewhat arbitrary, but it's what Class::MOP::Class considers # to be a method of a class or not, rather than what a consumer of such a # class would. # # CMC considers methods or attribute accessor methods defined directly in # the class or roles consumed directly to be methods of the class, and # methods (including attribute accessors) defined in superclasses # (directly, consumed role, attribute, etc) to not be methods defined by # the class. # # More simply put: If and only if a method defined in or consumed by a # class is it a method of the class. has_method_ok TestClass => 'foo'; has_method_ok TestClass => 'beep'; has_no_method_ok TestClass => 'bar'; subtest multiple => sub { has_method_ok TestClass => 'beep', 'foo'; has_no_method_ok TestClass => 'boop', 'bar'; }; subtest from_role => sub { has_method_ok TC2 => 'role', 'role_att' }; subtest superclass => sub { has_method_ok TC2 => 'bar'; has_no_method_ok TC2 => qw{ foo beep }; has_method_ok TC2 => qw{ role role_att }; }; }; subtest anywhere => sub { # This is more along the lines of what a consumer would consider a class # providing: they care about what can be called, not so much where the # method came from. has_method_from_anywhere_ok TestClass => qw{ foo beep }; has_no_method_from_anywhere_ok TestClass => qw{ nope }; has_method_from_anywhere_ok TC2 => qw{ foo beep bar role role_att }; has_method_from_anywhere_ok TestRole => qw{ role }; has_no_method_from_anywhere_ok TestRole => qw{ role_att }; has_method_from_anywhere_ok TestRole2 => qw{ role }; has_no_method_from_anywhere_ok TestRole2 => qw{ role_att }; subtest validate_class => sub { validate_class TC2 => (anywhere_methods => ['foo']); }; }; # FIXME TODO implement the above, below. ## has_method_ok() test_out 'ok 1 - TestClass has method foo'; has_method_ok 'TestClass', 'foo'; test_test 'has_method_ok works correctly with methods'; test_out 'not ok 1 - TestClass has method bar'; test_fail(1); has_method_ok 'TestClass', 'bar'; test_test 'has_method_ok works correctly with DNE methods'; # attribute accessor test_out 'ok 1 - TestClass has method beep'; has_method_ok 'TestClass', 'beep'; test_test 'has_method_ok works correctly with attribute accessor methods'; # role test_out 'ok 1 - TC2 has method role'; has_method_ok 'TC2', 'role'; test_test 'has_method_ok works correctly with methods from roles'; # superclass test_out 'not ok 1 - TC2 has method foo'; test_fail(1); has_method_ok 'TC2', 'foo'; test_test 'has_method_ok works correctly with superclass methods'; ## has_no_method_ok() test_out 'ok 1 - TestClass does not have method bar'; has_no_method_ok 'TestClass', 'bar'; test_test 'has_no_method_ok works correctly with methods'; test_out 'not ok 1 - TestClass does not have method foo'; test_fail(1); has_no_method_ok 'TestClass', 'foo'; test_test 'has_no_method_ok works correctly with DNE methods'; # attribute accessor test_out 'not ok 1 - TestClass does not have method beep'; test_fail(1); has_no_method_ok 'TestClass', 'beep'; test_test 'has_no_method_ok works correctly with attribute accessor methods'; # role test_out 'not ok 1 - TC2 does not have method role'; test_fail(1); has_no_method_ok 'TC2', 'role'; test_test 'has_no_method_ok works correctly with methods from roles'; # superclass test_out 'ok 1 - TC2 does not have method foo'; has_no_method_ok 'TC2', 'foo'; test_test 'has_no_method_ok works correctly with superclass methods'; # multiples { my ($_ok) = counters; test_out $_ok->('TestClass has method foo'); test_out $_ok->('TestClass has method baz'); has_method_ok TestClass => qw{ foo baz }; test_test 'has_method_ok multiples OK'; } { my ($_ok) = counters; test_out $_ok->('TestClass does not have method foo2'); test_out $_ok->('TestClass does not have method baz2'); has_no_method_ok TestClass => qw{ foo2 baz2 }; test_test 'has_no_method_ok multiples OK'; } done_testing; Test-Moose-More-0.050/t/meta_ok.t0000644000175000017500000000141213160632377016742 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole; use Moose::Role; } { package TestClass; use Moose; } { package TestClass::Fail; } use Test::Builder::Tester; # tests => 1; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; my $ROLE = 'TestRole::Role'; for my $thing (qw{ TestClass TestRole }) { # role - OK my ($_ok, $_nok) = counters(); test_out $_ok->("$thing has a meta"); meta_ok $thing; test_test "$thing is found to have a metaclass correctly"; } for my $thing (qw{ TestClass::Fail }) { # role - NOT OK my ($_ok, $_nok) = counters(); test_out $_nok->("$thing has a meta"); test_fail 1; meta_ok $thing; test_test "$thing is found to not have a metaclass correctly"; } done_testing; Test-Moose-More-0.050/t/does_ok.t0000644000175000017500000001042113160632377016746 0ustar rsrchboyrsrchboyuse strict; use warnings; { package TestRole::Role; use Moose::Role; } { package TestRole::Role2; use Moose::Role; } { package TestRole; use Moose::Role; with 'TestRole::Role'; } { package TestClass; use Moose; with 'TestRole::Role'; } { package TestRole::Two; use Moose::Role; with 'TestRole::Role'; with 'TestRole::Role2'; } { package TestClass::Two; use Moose; with 'TestRole::Role'; with 'TestRole::Role2'; } { package TestRole::Fail; use Moose::Role; } { package TestClass::Fail; use Moose; } { package TestRole::Fail2; use Moose::Role; with 'TestRole::Role2'; } { package TestClass::Fail2; use Moose; with 'TestRole::Role2'; } { package TestClass::NotMoosey; } use Test::Builder::Tester; use Test::More; use Test::Moose::More; use TAP::SimpleOutput 'counters'; my $ROLE = 'TestRole::Role'; my @ROLES = qw{ TestRole::Role TestRole::Role2 }; note 'single role, default message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->("$thing does $ROLE"); does_ok $thing, $ROLE; test_test "$thing is found to do $ROLE correctly"; } note 'single role, custom message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->('wah-wah'); does_ok $thing, $ROLE, 'wah-wah'; test_test "$thing: custom messages work as expected"; } note 'single role, "complex" custom message - OK'; for my $thing (qw{ TestClass TestRole }) { my ($_ok, $_nok) = counters(); test_out $_ok->("wah-wah $ROLE"); does_ok $thing, $ROLE, 'wah-wah %s'; test_test "$thing: 'complex' custom messages work as expected"; } note 'multiple roles, default message - OK'; for my $thing (qw{ TestClass::Two TestRole::Two }) { # role - OK my ($_ok, $_nok) = counters(); test_out $_ok->("$thing does $_") for @ROLES; does_ok $thing, [ @ROLES ]; test_test "$thing is found to do the roles correctly"; } note 'multiple roles, custom message - OK'; for my $thing (qw{ TestClass::Two TestRole::Two }) { # role - OK my ($_ok, $_nok) = counters(); my $msg = 'wah-wah'; test_out $_ok->($msg) for @ROLES; does_ok $thing, [ @ROLES ], $msg; test_test "$thing: multiple roles, custom messages work as expected"; } note 'multiple roles, "complex" custom message - OK'; for my $thing (qw{ TestClass::Two TestRole::Two }) { # role - OK my ($_ok, $_nok) = counters(); my $msg = 'wah-wah'; test_out $_ok->("$msg $_") for @ROLES; does_ok $thing, [ @ROLES ], "$msg %s"; test_test "$thing: multiple roles, 'complex' custom messages work as expected"; } note 'role - NOT OK'; for my $thing (qw{ TestClass::Fail TestRole::Fail }) { # role - NOT OK my ($_ok, $_nok) = counters(); test_out $_nok->("$thing does $ROLE"); test_fail 1; does_ok $thing, $ROLE; test_test "$thing is found to not do $ROLE correctly"; } note 'multiple roles - NOT OK'; for my $thing (qw{ TestClass::Fail TestRole::Fail }) { # role - OK my ($_ok, $_nok) = counters(); do { test_out $_nok->("$thing does $_"); test_fail 1 } for @ROLES; does_ok $thing, [ @ROLES ]; test_test "$thing: multiple roles fail as expected"; } note 'multiple roles - PARTIALLY OK'; for my $thing (qw{ TestClass::Fail2 TestRole::Fail2 }) { # role - OK my ($_ok, $_nok) = counters(); do { test_out $_nok->("$thing does $_"); test_fail 2 } for $ROLES[0]; do { test_out $_ok->("$thing does $_") } for $ROLES[1]; does_ok $thing, [ @ROLES ]; test_test "$thing: multiple roles partially fail as expected"; } note 'Class::MOP metaclass'; my $cmop_thing = 'TestClass::CMOP'; my $cmop_meta = Class::MOP::Class->create($cmop_thing => (methods => { foo => sub { 1 } })); { my ($_ok, $_nok) = counters(); test_out $_nok->("$cmop_thing does $ROLE"); test_fail 1; does_ok $cmop_thing => $ROLE; test_test q{Class::MOP metaclasses don't ever do roles}; } done_testing; Test-Moose-More-0.050/SIGNATURE0000644000175000017500000001355513160632377016172 0ustar rsrchboyrsrchboyThis file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.81. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: % cpansign -v It will check each file's integrity, as well as the signature's validity. If "==> Signature verified OK! <==" is not displayed, the distribution may already have been compromised, and you should not run its Makefile.PL or Build.PL. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 SHA1 a76fa1dfc018a4cfd8b958516756622f64348161 .travis.yml SHA1 90bd1441763f14d055f8666b2f225783b7f44336 Changes SHA1 1db48bf25c18398387f286f408c7056cb2b3f2f4 LICENSE SHA1 ab540ca6ef9e9fd1da3df97b49b4f744ecf78abc MANIFEST SHA1 11039e63b16c87c856c49849610d6d39c6cd0a3c META.json SHA1 3988764be3fe1ebb787c26b31ddb4d635126b826 META.yml SHA1 da11bb1941ee0a1514f02fd17a8f21e592ee46b9 Makefile.PL SHA1 b816474c513efff0164d9e645ef0d3af86cea617 README SHA1 d5b695d3873cf1e6e1f90bb474d30b24fa4d14b1 cpanfile SHA1 b916e5e22dce319b385382dbb6694a1d4b7ac634 dist.ini SHA1 834304deb7e02b9abbbf61ac9a5a248c697d750d lib/Test/Moose/More.pm SHA1 ee7cd01386c5f44698a041dd1d89884f7c56ae97 lib/Test/Moose/More/Utils.pm SHA1 4bdb7637c377a4563e26e887313ef118c1d1a22d t/00-check-deps.t SHA1 e946ec3779fa1c4ed65616e8cd3cf44de0be204c t/00-compile.t SHA1 e228ead2797c69dc68adfd4a9f416275d5f063d0 t/00-report-prereqs.dd SHA1 0b069a9f9a989e6affbf0e67612a64fce0de447e t/00-report-prereqs.t SHA1 7110de92a946d29acba283fbbf24357bbfe7989c t/attribute_options_ok/basic.t SHA1 cac1fe5cef9be4307c57fea3d7fdc59cfb0dc649 t/attribute_options_ok/subtest-wrapper.t SHA1 184cd396cdd45481169f5248992011f8ec90392d t/check_sugar.t SHA1 fa130538ee0db7bc425c4438510303c301b5c53b t/definition_context.t SHA1 84cff043ca5c580be332fffbc682731fe33b2def t/does_metaroles_ok.t SHA1 b8e1677fb22d9d5189211ad953222c298ffb915c t/does_not_metaroles_ok.t SHA1 f6a969d81a454a61db04670596743b885dce57b1 t/does_not_ok.t SHA1 3db63d1b2a94bf5a85a5c33e68f10d97f384de48 t/does_ok.t SHA1 6d28f78d54ce90d525713095c5b350cee4b3d7f5 t/has_attribute_ok.t SHA1 0d0fc1e01444cf49baa6c54ecfeba70ce7a734de t/is_anon_ok.t SHA1 fea5000217091f970afcb7a566754b63dd27b7be t/is_class_ok/basic.t SHA1 865ac31f6af1d36702f1c6564593c0e3ade22a2d t/is_class_ok/moose-meta-attribute-should-be-moosey.t SHA1 d77cb1e5a70d3db21d7ee5b5bed3c53468c6b71f t/is_immutable_ok.t SHA1 5bbd08043c6ffe760da4f0e22fdbb3f2bb112d77 t/is_not_anon_ok.t SHA1 ef4337fc54ee2dc9d829fa1a9dd01566a156be96 t/is_role_ok.t SHA1 4e15b688710f882cf42c2453db1b4b0827c64f4f t/meta_ok.t SHA1 7848e9c1869f12fb657388e1fe12c18fd7197452 t/method_from_pkg_ok.t SHA1 a8cc17e1186c33e9edabd510ceee0b4bb7039edb t/method_is_accessor_ok.t SHA1 5a0725550220ab8f4dbcc22e7e74fe0e37af997b t/method_is_not_accessor_ok.t SHA1 133970d038e0500b954c1e7324cf4e64df6241d0 t/method_not_from_pkg_ok.t SHA1 5e8af5ef04bff311f488caf9f509545e2b96f6fb t/method_ok.t SHA1 e9b420189bc27904a2f150fb35d075c4ab7442a3 t/no_meta_ok.t SHA1 fc226a89f533b01605f87079aafe49b3dacc04ea t/pristine_ok.t SHA1 2880954e42f74822063b2fd16d8c9385cd053c19 t/requires_method_ok.t SHA1 89032c090c1832ed2dd5d71df99dbcfdd3cae72b t/subtest-1.t SHA1 2917b04306f49bde951d184ad03e6be50c2fd2eb t/validate_attribute/basic.t SHA1 ed11a2cc0ea7e872c7a290ea1a64ca6d91407e57 t/validate_attribute/coerce.t SHA1 356f0b95ac1fe9a28c0152f934ed402bd8b1eb9b t/validate_attribute/in_roles.t SHA1 7b7d0aa491374ff42fa77a4d4f6f48514ad06466 t/validate_attribute/lazy.t SHA1 4fc9aca3361572938b60c19b90a83355eea78079 t/validate_attribute/required.t SHA1 9d1728683c4ade164467402c53392c0218f32925 t/validate_class/basic.t SHA1 ae7e2baf030390c298c1808c93fa33793b870724 t/validate_class/metaclasses.t SHA1 e4ee89a5767d00f94ae9401fa2ad0c666f09a3fe t/validate_class/metaroles.t SHA1 1665cd46eaa0e0afc6672a3aa22116cd96bbbfad t/validate_class/methods.t SHA1 d347de6d163478b3a0ab6ef7907f383f314d872a t/validate_role/basic.t SHA1 8536203d2f13c1e0699459ad6d3898a4b0dde568 t/validate_role/compose.t SHA1 f58b7417deafed81483f2b524d99045b023b6673 t/validate_role/metaclasses.t SHA1 7d033573ad27d4f46cbe0b311c31623a108581eb t/validate_role/metaroles.t SHA1 84a651676182892ea97083d6899237eec5b9b03f t/validate_thing/metaclasses.t SHA1 c80c4bf667c9df1aee10436347351fb13564f85c t/validate_thing/methods.t SHA1 a95c37eb417623ad7a8bf92889eaec1236a1b7a9 t/validate_thing/sugar.t SHA1 37f0fc8d581bfbc8c4c958871c6f7bc1718e94ec t/wrapped/in_roles.t SHA1 0f64122afef00d4d222fb3271f4724cb2796bd63 xt/author/eol.t SHA1 69fdcc614c9e5fb839bc1e57f75357a8f2c229af xt/author/no-tabs.t SHA1 4aee47eef041ab3d9b7bd3e988834ac6f89e1788 xt/author/pod-coverage.t SHA1 4123285182650d8a6e6b9774d0cb96fa5f7d481b xt/author/pod-linkcheck.t SHA1 50482a8f925d46bc72e0998f8dc240aeb61b98d3 xt/author/pod-spell.t SHA1 deeafedd8be9778d413afc70870e80c4b4883321 xt/author/pod-syntax.t SHA1 a7948d34cfaad400286ea5d5fa6206c4c7e2552c xt/release/consistent-version.t SHA1 ee9b7df31bf7fed3f212d1ad4978134864ca7892 xt/release/has-version.t SHA1 8d5bae9059da84886783b69e4f2d9b44e1c8a9ae xt/release/minimum-version.t SHA1 1ed41e239443d4045502c672c3b9ed460498c010 xt/release/no-smart-comments.t -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEqvAjTK4OlkLFh465K77AqDC8C58FAlnDNP4ACgkQK77AqDC8 C5/x4BAAqK0wcalpn5PfrqQOHYEecdSGj2Gc6Us4fUew+5XFf5H2yuDc9qSPtV3r 99Npn3kcUBmS3OgEsG51FXojk36jwCgYoLs34K79bbTX+bb+cjGatxztP7s1bYsR mEIU0C8/JRbLjV30NVbdxOWQ5q9CkpgWXY9rP4chXm7FOExYyTrH7ADtSM7h3ems cY1XsY2olc0/t6d4fRUjm36/iGmK4648YfADLqNPG3gVKRExpvqH3XtH73wKF4yN stT/YVgdWxvzG1MNM2yp3tEezj7fna/l0S5fFvTAQn+r/6vm2nyHmtb2QdIgS//M PoYN9+9+f/5Gp3OMI72Xzyi5tUKEyFVUtCg4HnZir7LoX4VSMBPKhPpavWf2Jetv IvDcH8/Cst27AE4ZfdKYycp38wkUuzF8umQ/48FzkNzJQdlo9VxeIP66MaKBKo97 da/HZL2oIYFR/Xoxd7HyZrWF6OrbIvhrmddnSlVVYRcqTndA25sdY2fLJh1kgmIg LwlRa6t8oEzZPCglyZE3Nl9xAUkOHwLfbB2h+bF9YI2u76ZQZ5FT83k8wYnKPhMX +Rg37FU58NZDxS27Em2IFn35q2zbw2MAwKbScfPKI4hQFfrlgjaxlv+OhKTpwz9v CcbcRIgWA5KijPx1AF+3rd20x/zDfI4TkRF9A65YVaVOemo96po= =z94e -----END PGP SIGNATURE----- Test-Moose-More-0.050/META.json0000644000175000017500000011271413160632377016324 0ustar rsrchboyrsrchboy{ "abstract" : "More tools for testing Moose packages", "author" : [ "Chris Weyl " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150010", "license" : [ "lgpl_2_1" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Test-Moose-More", "no_index" : { "directory" : [ "corpus", "t" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0", "perl" : "5.006" } }, "develop" : { "requires" : { "Pod::Coverage::TrustPod" : "0", "Pod::Wordlist" : "0", "Test::ConsistentVersion" : "0", "Test::EOL" : "0", "Test::HasVersion" : "0", "Test::MinimumVersion" : "0", "Test::More" : "0.88", "Test::NoSmartComments" : "0", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", "Test::Pod::LinkCheck" : "0", "Test::Spelling" : "0.12" } }, "runtime" : { "requires" : { "Carp" : "0", "Data::OptList" : "0", "List::MoreUtils" : "0", "List::Util" : "1.45", "Moose::Util" : "0", "Moose::Util::TypeConstraints" : "0", "Scalar::Util" : "0", "Sub::Exporter::Progressive" : "0", "Syntax::Keyword::Junction" : "0", "Test::Builder" : "0", "Test::Moose" : "0", "Test::More" : "0.94", "perl" : "5.006", "strict" : "0", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "List::Util" : "1.45", "Moose" : "0", "Moose::Meta::Attribute" : "0", "Moose::Role" : "0", "Moose::Util::MetaRole" : "0", "TAP::SimpleOutput" : "0.009", "Test::Builder::Tester" : "0", "Test::CheckDeps" : "0.010", "Test::More" : "0.94", "namespace::autoclean" : "0", "perl" : "5.006" } } }, "provides" : { "Test::Moose::More" : { "file" : "lib/Test/Moose/More.pm", "version" : "0.050" }, "Test::Moose::More::Utils" : { "file" : "lib/Test/Moose/More/Utils.pm", "version" : "0.050" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/RsrchBoy/Test-Moose-More/issues" }, "homepage" : "https://github.com/RsrchBoy/Test-Moose-More", "repository" : { "type" : "git", "url" : "https://github.com/RsrchBoy/Test-Moose-More.git", "web" : "https://github.com/RsrchBoy/Test-Moose-More" } }, "version" : "0.050", "x_BuiltWith" : { "modules" : { "CPAN::Meta" : "2.150010", "Carp" : "1.42", "Data::OptList" : "0.110", "ExtUtils::MakeMaker" : "7.30", "File::Spec" : "3.67", "IO::Handle" : "1.36", "IPC::Open3" : "1.20", "List::MoreUtils" : "0.419", "List::Util" : "1.48", "Moose" : "2.2006", "Moose::Meta::Attribute" : "2.2006", "Moose::Role" : "2.2006", "Moose::Util" : "2.2006", "Moose::Util::MetaRole" : "2.2006", "Moose::Util::TypeConstraints" : "2.2006", "Pod::Coverage::TrustPod" : "0.100003", "Pod::Wordlist" : "1.20", "Scalar::Util" : "1.48", "Sub::Exporter::Progressive" : "0.001013", "Syntax::Keyword::Junction" : "0.003008", "TAP::SimpleOutput" : "0.009", "Test::Builder" : "1.302086", "Test::Builder::Tester" : "1.302086", "Test::CheckDeps" : "0.010", "Test::ConsistentVersion" : "0.3.0", "Test::EOL" : "2.00", "Test::HasVersion" : "0.014", "Test::MinimumVersion" : "0.101082", "Test::Moose" : "2.2006", "Test::More" : "1.302086", "Test::NoSmartComments" : "0.005", "Test::NoTabs" : "2.00", "Test::Pod" : "1.51", "Test::Pod::Coverage" : "1.10", "Test::Pod::LinkCheck" : "0.008", "Test::Spelling" : "0.20", "namespace::autoclean" : "0.28", "strict" : "1.11", "warnings" : "1.37" }, "perl" : { "original" : "v5.26.0", "qv" : 1, "version" : [ 5, 26, 0 ] }, "platform" : "linux" }, "x_Dist_Zilla" : { "perl" : { "version" : "5.026000" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@RSRCHBOY/NextRelease", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "config" : { "Dist::Zilla::Plugin::Git::NextVersion" : { "first_version" : "0.001", "version_by_branch" : 0, "version_regexp" : "(?^:^(\\d.\\d+(_\\d\\d)?)(-TRIAL|)$)" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.14.1", "repo_root" : "." } }, "name" : "@RSRCHBOY/Git::NextVersion", "version" : "2.042" }, { "class" : "Dist::Zilla::Plugin::CopyrightYearFromGit", "name" : "@RSRCHBOY/CopyrightYearFromGit", "version" : "0.003" }, { "class" : "Dist::Zilla::Plugin::ContributorsFromGit", "name" : "@RSRCHBOY/ContributorsFromGit", "version" : "0.019" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "config" : { "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.14.1", "repo_root" : "." } }, "name" : "@RSRCHBOY/@Git::CheckFor/Git::CheckFor::CorrectBranch", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::Fixups", "config" : { "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.14.1", "repo_root" : "." } }, "name" : "@RSRCHBOY/@Git::CheckFor/Git::CheckFor::Fixups", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", "config" : { "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.14.1", "repo_root" : "." } }, "name" : "@RSRCHBOY/@Git::CheckFor/Git::CheckFor::MergeConflicts", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "LICENSE" ], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "@RSRCHBOY/Git::GatherDir", "version" : "2.042" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 0, "check_all_prereqs" : 0, "modules" : [ "Dist::Zilla", "Dist::Zilla::PluginBundle::RSRCHBOY" ], "phase" : "build", "run_under_travis" : 0, "skip" : [] } }, "name" : "@RSRCHBOY/PromptIfStale", "version" : "0.054" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@RSRCHBOY/PruneCruft", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::Git::Describe", "name" : "@RSRCHBOY/Git::Describe", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@RSRCHBOY/ExecDir", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@RSRCHBOY/ShareDir", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@RSRCHBOY/MakeMaker", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@RSRCHBOY/Manifest", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::SurgicalPkgVersion", "name" : "@RSRCHBOY/SurgicalPkgVersion", "version" : "0.0019" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@RSRCHBOY/MinimumPerl", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@RSRCHBOY/Test::ReportPrereqs", "version" : "0.027" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@RSRCHBOY/AutoPrereqs", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::Prepender", "name" : "@RSRCHBOY/Prepender", "version" : "2.004" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@RSRCHBOY/AuthorBundleDevelopRequires", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "config" : { "Dist::Zilla::Plugin::Test::PodSpelling" : { "directories" : [ "bin", "lib" ], "spell_cmd" : "", "stopwords" : [ "ABEND", "AFAICT", "Formattable", "Gratipay", "PayPal", "RSRCHBOY", "RSRCHBOY's", "codebase", "coderef", "formattable", "gpg", "implementers", "ini", "metaclass", "metaclasses", "parameterization", "parameterized", "subclasses" ], "wordlist" : "Pod::Wordlist" } }, "name" : "@RSRCHBOY/Test::PodSpelling", "version" : "2.007004" }, { "class" : "Dist::Zilla::Plugin::ConsistentVersionTest", "name" : "@RSRCHBOY/ConsistentVersionTest", "version" : "0.03" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@RSRCHBOY/PodCoverageTests", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@RSRCHBOY/PodSyntaxTests", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "filename" : "xt/author/no-tabs.t", "finder" : [ ":InstallModules", ":ExecFiles", ":TestFiles" ] } }, "name" : "@RSRCHBOY/Test::NoTabs", "version" : "0.15" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":ExecFiles", ":InstallModules", ":TestFiles" ], "trailing_whitespace" : 1 } }, "name" : "@RSRCHBOY/Test::EOL", "version" : "0.19" }, { "class" : "Dist::Zilla::Plugin::HasVersionTests", "name" : "@RSRCHBOY/HasVersionTests", "version" : "1.101420" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : 0, "fail_on_warning" : "author", "fake_home" : 0, "filename" : "t/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "test", "script_finder" : [ ":PerlExecFiles" ], "skips" : [], "switch" : [] } }, "name" : "@RSRCHBOY/Test::Compile", "version" : "2.057" }, { "class" : "Dist::Zilla::Plugin::NoSmartCommentsTests", "name" : "@RSRCHBOY/NoSmartCommentsTests", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::Test::Pod::LinkCheck", "name" : "@RSRCHBOY/Test::Pod::LinkCheck", "version" : "1.003" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@RSRCHBOY/RunExtraTests", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "name" : "@RSRCHBOY/Test::MinimumVersion", "version" : "2.000007" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@RSRCHBOY/Authority", "version" : "1.009" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@RSRCHBOY/MetaConfig", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@RSRCHBOY/MetaJSON", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@RSRCHBOY/MetaYAML", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@RSRCHBOY/MetaNoIndex", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@RSRCHBOY/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.010" } ], "include_underscores" : 0 }, "Dist::Zilla::Role::MetaProvider::Provider" : { "$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002004", "inherit_missing" : 1, "inherit_version" : 1, "meta_noindex" : 1 }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000033", "version" : "0.004" } }, "name" : "@RSRCHBOY/MetaProvides::Package", "version" : "2.004003" }, { "class" : "Dist::Zilla::Plugin::MetaData::BuiltWith", "config" : { "Dist::Zilla::Plugin::MetaData::BuiltWith" : { "$Module::Metadata::VERSION" : "1.000033", "_stash_key" : "x_BuiltWith", "external_file_name" : "misc/built_with.json", "show_config" : 0, "show_uname" : 0, "use_external_file" : null } }, "name" : "@RSRCHBOY/MetaData::BuiltWith", "version" : "1.004005" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@RSRCHBOY/GithubMeta", "version" : "0.54" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@RSRCHBOY/TestRelease", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", "name" : "@RSRCHBOY/CheckChangesHasContent", "version" : "0.010" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@RSRCHBOY/CheckPrereqsIndexed", "version" : "0.020" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Update", "name" : "@RSRCHBOY/GitFetchOrigin", "version" : "0.1.2" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "@RSRCHBOY/GitCheckReleaseBranchSync", "version" : "0.1.2" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "@RSRCHBOY/GitCheckMasterBranchSync", "version" : "0.1.2" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ ".gitignore", ".travis.yml", "Changes", "LICENSE", "README.mkdn", "dist.ini", "weaver.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.14.1", "repo_root" : "." } }, "name" : "@RSRCHBOY/Git::Check", "version" : "2.042" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "v%v%n%n%c" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ ".gitignore", ".travis.yml", "Changes", "LICENSE", "README.mkdn", "dist.ini", "weaver.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.14.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@RSRCHBOY/Git::Commit", "version" : "2.042" }, { "class" : "Dist::Zilla::Plugin::Test::CheckDeps", "config" : { "Dist::Zilla::Plugin::Test::CheckDeps" : { "fatal" : 1, "filename" : "t/00-check-deps.t", "level" : "suggests", "todo_when" : "0" } }, "name" : "@RSRCHBOY/Test::CheckDeps", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::CheckSelfDependency", "config" : { "Dist::Zilla::Plugin::CheckSelfDependency" : { "finder" : [ ":InstallModules" ] }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000033", "version" : "0.004" } }, "name" : "@RSRCHBOY/CheckSelfDependency", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::Travis::ConfigForReleaseBranch", "name" : "@RSRCHBOY/Travis::ConfigForReleaseBranch", "version" : "0.005" }, { "class" : "Dist::Zilla::Plugin::SchwartzRatio", "name" : "@RSRCHBOY/SchwartzRatio", "version" : "0.3.2" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 1, "tag" : "0.050", "tag_format" : "%v", "tag_message" : "v%v" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.14.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@RSRCHBOY/Git::Tag", "version" : "2.042" }, { "class" : "Dist::Zilla::Plugin::Git::CommitBuild", "config" : { "Dist::Zilla::Plugin::Git::CommitBuild" : { "branch" : "build/%b", "build_root" : null, "message" : "Build results of %h (on %b)", "multiple_inheritance" : 0, "release_branch" : null, "release_message" : "Build results of %h (on %b)" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.14.1", "repo_root" : "." } }, "name" : "@RSRCHBOY/Git::CommitBuild::Build", "version" : "2.042" }, { "class" : "Dist::Zilla::Plugin::Git::CommitBuild", "config" : { "Dist::Zilla::Plugin::Git::CommitBuild" : { "branch" : "build/%b", "build_root" : null, "message" : "Build results of %h (on %b)", "multiple_inheritance" : 1, "release_branch" : "release/cpan", "release_message" : "Full build of CPAN release %v%t" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.14.1", "repo_root" : "." } }, "name" : "@RSRCHBOY/Git::CommitBuild::Release", "version" : "2.042" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin", "origin refs/heads/release/cpan:refs/heads/release/cpan" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.14.1", "repo_root" : "." } }, "name" : "@RSRCHBOY/Git::Push", "version" : "2.042" }, { "class" : "Dist::Zilla::Plugin::Twitter", "name" : "@RSRCHBOY/Twitter", "version" : "0.026" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@RSRCHBOY/UploadToCPAN", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::Signature", "name" : "@RSRCHBOY/Signature", "version" : "1.100930" }, { "class" : "Dist::Zilla::Plugin::InstallRelease", "name" : "@RSRCHBOY/InstallRelease", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "config" : { "Dist::Zilla::Plugin::GitHub::Update" : { "metacpan" : 1 } }, "name" : "@RSRCHBOY/GitHub::Update", "version" : "0.44" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "fatal_errors" : 1, "quiet" : 0, "run" : [ "mkdir -p releases ; mv %s releases/" ], "version" : "0.046" } }, "name" : "@RSRCHBOY/Run::AfterRelease", "version" : "0.046" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@RSRCHBOY/ConfirmRelease", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@RSRCHBOY/License", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::CPANFile", "name" : "@RSRCHBOY/CPANFile", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@RSRCHBOY/ReadmeMarkdownInRoot", "version" : "0.163250" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@RSRCHBOY/ReadmeTxt", "version" : "0.163250" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", "name" : "@RSRCHBOY/CopyFilesFromBuild", "version" : "0.170880" }, { "class" : "Dist::Zilla::Plugin::GitHubREADME::Badge", "name" : "@RSRCHBOY/GitHubREADME::Badge", "version" : "0.22" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "config_plugins" : [ "@RSRCHBOY" ], "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::StopWords", "name" : "@RSRCHBOY/StopWords", "version" : "1.010" }, { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@RSRCHBOY/Name", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@RSRCHBOY/Version", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@RSRCHBOY/prelude", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OVERVIEW", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "EXTENDS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "IMPLEMENTS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "CONSUMES", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::RSRCHBOY::RoleParameters", "name" : "ROLE PARAMETERS", "version" : "0.075" }, { "class" : "Pod::Weaver::Section::RSRCHBOY::RequiredAttributes", "name" : "REQUIRED ATTRIBUTES", "version" : "0.075" }, { "class" : "Pod::Weaver::Section::RSRCHBOY::LazyAttributes", "name" : "LAZY ATTRIBUTES", "version" : "0.075" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "REQUIRED METHODS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "ATTRIBUTES", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "BEFORE METHOD MODIFIERS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "AROUND METHOD MODIFIERS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "AFTER METHOD MODIFIERS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "PRIVATE METHODS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "FUNCTIONS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "TYPES", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "TEST FUNCTIONS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@RSRCHBOY/Leftovers", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@RSRCHBOY/postlude", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::SeeAlso", "name" : "@RSRCHBOY/SeeAlso", "version" : "1.003" }, { "class" : "Pod::Weaver::Section::Bugs", "name" : "@RSRCHBOY/Bugs", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::RSRCHBOY::Authors", "name" : "RSRCHBOY::Authors", "version" : "0.075" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@RSRCHBOY/Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@RSRCHBOY/Legal", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@RSRCHBOY/List", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@RSRCHBOY/SingleEncoding", "version" : "4.015" } ] } }, "name" : "@RSRCHBOY/PodWeaver", "version" : "4.008" }, { "class" : "Dist::Zilla::Plugin::RemovePrereqs", "config" : { "Dist::Zilla::Plugin::RemovePrereqs" : { "modules_to_remove" : [ "Moose::Deprecated" ] } }, "name" : "RemovePrereqs", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.010" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@RSRCHBOY/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.010" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.010" } }, "x_authority" : "cpan:RSRCHBOY", "x_contributors" : [ "Chad Granum ", "Karen Etheridge " ], "x_serialization_backend" : "Cpanel::JSON::XS version 3.0238" } Test-Moose-More-0.050/cpanfile0000644000175000017500000000336213160632377016405 0ustar rsrchboyrsrchboyrequires "Carp" => "0"; requires "Data::OptList" => "0"; requires "List::MoreUtils" => "0"; requires "List::Util" => "1.45"; requires "Moose::Util" => "0"; requires "Moose::Util::TypeConstraints" => "0"; requires "Scalar::Util" => "0"; requires "Sub::Exporter::Progressive" => "0"; requires "Syntax::Keyword::Junction" => "0"; requires "Test::Builder" => "0"; requires "Test::Moose" => "0"; requires "Test::More" => "0.94"; requires "perl" => "5.006"; requires "strict" => "0"; requires "warnings" => "0"; on 'test' => sub { requires "ExtUtils::MakeMaker" => "0"; requires "File::Spec" => "0"; requires "IO::Handle" => "0"; requires "IPC::Open3" => "0"; requires "List::Util" => "1.45"; requires "Moose" => "0"; requires "Moose::Meta::Attribute" => "0"; requires "Moose::Role" => "0"; requires "Moose::Util::MetaRole" => "0"; requires "TAP::SimpleOutput" => "0.009"; requires "Test::Builder::Tester" => "0"; requires "Test::CheckDeps" => "0.010"; requires "Test::More" => "0.94"; requires "namespace::autoclean" => "0"; requires "perl" => "5.006"; }; on 'test' => sub { recommends "CPAN::Meta" => "2.120900"; }; on 'configure' => sub { requires "ExtUtils::MakeMaker" => "0"; requires "perl" => "5.006"; }; on 'develop' => sub { requires "Pod::Coverage::TrustPod" => "0"; requires "Pod::Wordlist" => "0"; requires "Test::ConsistentVersion" => "0"; requires "Test::EOL" => "0"; requires "Test::HasVersion" => "0"; requires "Test::MinimumVersion" => "0"; requires "Test::More" => "0.88"; requires "Test::NoSmartComments" => "0"; requires "Test::NoTabs" => "0"; requires "Test::Pod" => "1.41"; requires "Test::Pod::Coverage" => "1.08"; requires "Test::Pod::LinkCheck" => "0"; requires "Test::Spelling" => "0.12"; }; Test-Moose-More-0.050/META.yml0000644000175000017500000006054113160632377016154 0ustar rsrchboyrsrchboy--- abstract: 'More tools for testing Moose packages' author: - 'Chris Weyl ' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' IO::Handle: '0' IPC::Open3: '0' List::Util: '1.45' Moose: '0' Moose::Meta::Attribute: '0' Moose::Role: '0' Moose::Util::MetaRole: '0' TAP::SimpleOutput: '0.009' Test::Builder::Tester: '0' Test::CheckDeps: '0.010' Test::More: '0.94' namespace::autoclean: '0' perl: '5.006' configure_requires: ExtUtils::MakeMaker: '0' perl: '5.006' dynamic_config: '0' generated_by: 'Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150010' license: lgpl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Test-Moose-More no_index: directory: - corpus - t provides: Test::Moose::More: file: lib/Test/Moose/More.pm version: '0.050' Test::Moose::More::Utils: file: lib/Test/Moose/More/Utils.pm version: '0.050' requires: Carp: '0' Data::OptList: '0' List::MoreUtils: '0' List::Util: '1.45' Moose::Util: '0' Moose::Util::TypeConstraints: '0' Scalar::Util: '0' Sub::Exporter::Progressive: '0' Syntax::Keyword::Junction: '0' Test::Builder: '0' Test::Moose: '0' Test::More: '0.94' perl: '5.006' strict: '0' warnings: '0' resources: bugtracker: https://github.com/RsrchBoy/Test-Moose-More/issues homepage: https://github.com/RsrchBoy/Test-Moose-More repository: https://github.com/RsrchBoy/Test-Moose-More.git version: '0.050' x_BuiltWith: modules: CPAN::Meta: '2.150010' Carp: '1.42' Data::OptList: '0.110' ExtUtils::MakeMaker: '7.30' File::Spec: '3.67' IO::Handle: '1.36' IPC::Open3: '1.20' List::MoreUtils: '0.419' List::Util: '1.48' Moose: '2.2006' Moose::Meta::Attribute: '2.2006' Moose::Role: '2.2006' Moose::Util: '2.2006' Moose::Util::MetaRole: '2.2006' Moose::Util::TypeConstraints: '2.2006' Pod::Coverage::TrustPod: '0.100003' Pod::Wordlist: '1.20' Scalar::Util: '1.48' Sub::Exporter::Progressive: '0.001013' Syntax::Keyword::Junction: '0.003008' TAP::SimpleOutput: '0.009' Test::Builder: '1.302086' Test::Builder::Tester: '1.302086' Test::CheckDeps: '0.010' Test::ConsistentVersion: 0.3.0 Test::EOL: '2.00' Test::HasVersion: '0.014' Test::MinimumVersion: '0.101082' Test::Moose: '2.2006' Test::More: '1.302086' Test::NoSmartComments: '0.005' Test::NoTabs: '2.00' Test::Pod: '1.51' Test::Pod::Coverage: '1.10' Test::Pod::LinkCheck: '0.008' Test::Spelling: '0.20' namespace::autoclean: '0.28' strict: '1.11' warnings: '1.37' perl: original: v5.26.0 qv: 1 version: - 5 - 26 - 0 platform: linux x_Dist_Zilla: perl: version: '5.026000' plugins: - class: Dist::Zilla::Plugin::NextRelease name: '@RSRCHBOY/NextRelease' version: '6.010' - class: Dist::Zilla::Plugin::Git::NextVersion config: Dist::Zilla::Plugin::Git::NextVersion: first_version: '0.001' version_by_branch: '0' version_regexp: (?^:^(\d.\d+(_\d\d)?)(-TRIAL|)$) Dist::Zilla::Role::Git::Repo: git_version: 2.14.1 repo_root: . name: '@RSRCHBOY/Git::NextVersion' version: '2.042' - class: Dist::Zilla::Plugin::CopyrightYearFromGit name: '@RSRCHBOY/CopyrightYearFromGit' version: '0.003' - class: Dist::Zilla::Plugin::ContributorsFromGit name: '@RSRCHBOY/ContributorsFromGit' version: '0.019' - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch config: Dist::Zilla::Role::Git::Repo: git_version: 2.14.1 repo_root: . name: '@RSRCHBOY/@Git::CheckFor/Git::CheckFor::CorrectBranch' version: '0.014' - class: Dist::Zilla::Plugin::Git::CheckFor::Fixups config: Dist::Zilla::Role::Git::Repo: git_version: 2.14.1 repo_root: . name: '@RSRCHBOY/@Git::CheckFor/Git::CheckFor::Fixups' version: '0.014' - class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts config: Dist::Zilla::Role::Git::Repo: git_version: 2.14.1 repo_root: . name: '@RSRCHBOY/@Git::CheckFor/Git::CheckFor::MergeConflicts' version: '0.014' - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - LICENSE exclude_match: [] follow_symlinks: '0' include_dotfiles: '0' prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: '0' name: '@RSRCHBOY/Git::GatherDir' version: '2.042' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: '0' check_all_prereqs: '0' modules: - Dist::Zilla - Dist::Zilla::PluginBundle::RSRCHBOY phase: build run_under_travis: '0' skip: [] name: '@RSRCHBOY/PromptIfStale' version: '0.054' - class: Dist::Zilla::Plugin::PruneCruft name: '@RSRCHBOY/PruneCruft' version: '6.010' - class: Dist::Zilla::Plugin::Git::Describe name: '@RSRCHBOY/Git::Describe' version: '0.007' - class: Dist::Zilla::Plugin::ExecDir name: '@RSRCHBOY/ExecDir' version: '6.010' - class: Dist::Zilla::Plugin::ShareDir name: '@RSRCHBOY/ShareDir' version: '6.010' - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: '1' name: '@RSRCHBOY/MakeMaker' version: '6.010' - class: Dist::Zilla::Plugin::Manifest name: '@RSRCHBOY/Manifest' version: '6.010' - class: Dist::Zilla::Plugin::SurgicalPkgVersion name: '@RSRCHBOY/SurgicalPkgVersion' version: '0.0019' - class: Dist::Zilla::Plugin::MinimumPerl name: '@RSRCHBOY/MinimumPerl' version: '1.006' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@RSRCHBOY/Test::ReportPrereqs' version: '0.027' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@RSRCHBOY/AutoPrereqs' version: '6.010' - class: Dist::Zilla::Plugin::Prepender name: '@RSRCHBOY/Prepender' version: '2.004' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@RSRCHBOY/AuthorBundleDevelopRequires' version: '6.010' - class: Dist::Zilla::Plugin::Test::PodSpelling config: Dist::Zilla::Plugin::Test::PodSpelling: directories: - bin - lib spell_cmd: '' stopwords: - ABEND - AFAICT - Formattable - Gratipay - PayPal - RSRCHBOY - "RSRCHBOY's" - codebase - coderef - formattable - gpg - implementers - ini - metaclass - metaclasses - parameterization - parameterized - subclasses wordlist: Pod::Wordlist name: '@RSRCHBOY/Test::PodSpelling' version: '2.007004' - class: Dist::Zilla::Plugin::ConsistentVersionTest name: '@RSRCHBOY/ConsistentVersionTest' version: '0.03' - class: Dist::Zilla::Plugin::PodCoverageTests name: '@RSRCHBOY/PodCoverageTests' version: '6.010' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@RSRCHBOY/PodSyntaxTests' version: '6.010' - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: filename: xt/author/no-tabs.t finder: - ':InstallModules' - ':ExecFiles' - ':TestFiles' name: '@RSRCHBOY/Test::NoTabs' version: '0.15' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':ExecFiles' - ':InstallModules' - ':TestFiles' trailing_whitespace: '1' name: '@RSRCHBOY/Test::EOL' version: '0.19' - class: Dist::Zilla::Plugin::HasVersionTests name: '@RSRCHBOY/HasVersionTests' version: '1.101420' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '0' fail_on_warning: author fake_home: '0' filename: t/00-compile.t module_finder: - ':InstallModules' needs_display: '0' phase: test script_finder: - ':PerlExecFiles' skips: [] switch: [] name: '@RSRCHBOY/Test::Compile' version: '2.057' - class: Dist::Zilla::Plugin::NoSmartCommentsTests name: '@RSRCHBOY/NoSmartCommentsTests' version: '0.009' - class: Dist::Zilla::Plugin::Test::Pod::LinkCheck name: '@RSRCHBOY/Test::Pod::LinkCheck' version: '1.003' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: '1' name: '@RSRCHBOY/RunExtraTests' version: '0.029' - class: Dist::Zilla::Plugin::Test::MinimumVersion name: '@RSRCHBOY/Test::MinimumVersion' version: '2.000007' - class: Dist::Zilla::Plugin::Authority name: '@RSRCHBOY/Authority' version: '1.009' - class: Dist::Zilla::Plugin::MetaConfig name: '@RSRCHBOY/MetaConfig' version: '6.010' - class: Dist::Zilla::Plugin::MetaJSON name: '@RSRCHBOY/MetaJSON' version: '6.010' - class: Dist::Zilla::Plugin::MetaYAML name: '@RSRCHBOY/MetaYAML' version: '6.010' - class: Dist::Zilla::Plugin::MetaNoIndex name: '@RSRCHBOY/MetaNoIndex' version: '6.010' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: '@RSRCHBOY/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '6.010' include_underscores: '0' Dist::Zilla::Role::MetaProvider::Provider: $Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002004' inherit_missing: '1' inherit_version: '1' meta_noindex: '1' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000033' version: '0.004' name: '@RSRCHBOY/MetaProvides::Package' version: '2.004003' - class: Dist::Zilla::Plugin::MetaData::BuiltWith config: Dist::Zilla::Plugin::MetaData::BuiltWith: $Module::Metadata::VERSION: '1.000033' _stash_key: x_BuiltWith external_file_name: misc/built_with.json show_config: '0' show_uname: '0' use_external_file: ~ name: '@RSRCHBOY/MetaData::BuiltWith' version: '1.004005' - class: Dist::Zilla::Plugin::GithubMeta name: '@RSRCHBOY/GithubMeta' version: '0.54' - class: Dist::Zilla::Plugin::TestRelease name: '@RSRCHBOY/TestRelease' version: '6.010' - class: Dist::Zilla::Plugin::CheckChangesHasContent name: '@RSRCHBOY/CheckChangesHasContent' version: '0.010' - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@RSRCHBOY/CheckPrereqsIndexed' version: '0.020' - class: Dist::Zilla::Plugin::Git::Remote::Update name: '@RSRCHBOY/GitFetchOrigin' version: 0.1.2 - class: Dist::Zilla::Plugin::Git::Remote::Check name: '@RSRCHBOY/GitCheckReleaseBranchSync' version: 0.1.2 - class: Dist::Zilla::Plugin::Git::Remote::Check name: '@RSRCHBOY/GitCheckMasterBranchSync' version: 0.1.2 - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - .gitignore - .travis.yml - Changes - LICENSE - README.mkdn - dist.ini - weaver.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.14.1 repo_root: . name: '@RSRCHBOY/Git::Check' version: '2.042' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: v%v%n%n%c Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - .gitignore - .travis.yml - Changes - LICENSE - README.mkdn - dist.ini - weaver.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.14.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@RSRCHBOY/Git::Commit' version: '2.042' - class: Dist::Zilla::Plugin::Test::CheckDeps config: Dist::Zilla::Plugin::Test::CheckDeps: fatal: '1' filename: t/00-check-deps.t level: suggests todo_when: '0' name: '@RSRCHBOY/Test::CheckDeps' version: '0.014' - class: Dist::Zilla::Plugin::CheckSelfDependency config: Dist::Zilla::Plugin::CheckSelfDependency: finder: - ':InstallModules' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000033' version: '0.004' name: '@RSRCHBOY/CheckSelfDependency' version: '0.011' - class: Dist::Zilla::Plugin::Travis::ConfigForReleaseBranch name: '@RSRCHBOY/Travis::ConfigForReleaseBranch' version: '0.005' - class: Dist::Zilla::Plugin::SchwartzRatio name: '@RSRCHBOY/SchwartzRatio' version: 0.3.2 - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: '1' tag: '0.050' tag_format: '%v' tag_message: v%v Dist::Zilla::Role::Git::Repo: git_version: 2.14.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@RSRCHBOY/Git::Tag' version: '2.042' - class: Dist::Zilla::Plugin::Git::CommitBuild config: Dist::Zilla::Plugin::Git::CommitBuild: branch: build/%b build_root: ~ message: 'Build results of %h (on %b)' multiple_inheritance: '0' release_branch: ~ release_message: 'Build results of %h (on %b)' Dist::Zilla::Role::Git::Repo: git_version: 2.14.1 repo_root: . name: '@RSRCHBOY/Git::CommitBuild::Build' version: '2.042' - class: Dist::Zilla::Plugin::Git::CommitBuild config: Dist::Zilla::Plugin::Git::CommitBuild: branch: build/%b build_root: ~ message: 'Build results of %h (on %b)' multiple_inheritance: '1' release_branch: release/cpan release_message: 'Full build of CPAN release %v%t' Dist::Zilla::Role::Git::Repo: git_version: 2.14.1 repo_root: . name: '@RSRCHBOY/Git::CommitBuild::Release' version: '2.042' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin - 'origin refs/heads/release/cpan:refs/heads/release/cpan' remotes_must_exist: '1' Dist::Zilla::Role::Git::Repo: git_version: 2.14.1 repo_root: . name: '@RSRCHBOY/Git::Push' version: '2.042' - class: Dist::Zilla::Plugin::Twitter name: '@RSRCHBOY/Twitter' version: '0.026' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@RSRCHBOY/UploadToCPAN' version: '6.010' - class: Dist::Zilla::Plugin::Signature name: '@RSRCHBOY/Signature' version: '1.100930' - class: Dist::Zilla::Plugin::InstallRelease name: '@RSRCHBOY/InstallRelease' version: '0.008' - class: Dist::Zilla::Plugin::GitHub::Update config: Dist::Zilla::Plugin::GitHub::Update: metacpan: '1' name: '@RSRCHBOY/GitHub::Update' version: '0.44' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: fatal_errors: '1' quiet: '0' run: - 'mkdir -p releases ; mv %s releases/' version: '0.046' name: '@RSRCHBOY/Run::AfterRelease' version: '0.046' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@RSRCHBOY/ConfirmRelease' version: '6.010' - class: Dist::Zilla::Plugin::License name: '@RSRCHBOY/License' version: '6.010' - class: Dist::Zilla::Plugin::CPANFile name: '@RSRCHBOY/CPANFile' version: '6.010' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@RSRCHBOY/ReadmeMarkdownInRoot' version: '0.163250' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@RSRCHBOY/ReadmeTxt' version: '0.163250' - class: Dist::Zilla::Plugin::CopyFilesFromBuild name: '@RSRCHBOY/CopyFilesFromBuild' version: '0.170880' - class: Dist::Zilla::Plugin::GitHubREADME::Badge name: '@RSRCHBOY/GitHubREADME::Badge' version: '0.22' - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: config_plugins: - '@RSRCHBOY' finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::StopWords name: '@RSRCHBOY/StopWords' version: '1.010' - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: '4.015' - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: '4.015' - class: Pod::Weaver::Section::Name name: '@RSRCHBOY/Name' version: '4.015' - class: Pod::Weaver::Section::Version name: '@RSRCHBOY/Version' version: '4.015' - class: Pod::Weaver::Section::Region name: '@RSRCHBOY/prelude' version: '4.015' - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: '4.015' - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: '4.015' - class: Pod::Weaver::Section::Generic name: OVERVIEW version: '4.015' - class: Pod::Weaver::Section::Collect name: EXTENDS version: '4.015' - class: Pod::Weaver::Section::Collect name: IMPLEMENTS version: '4.015' - class: Pod::Weaver::Section::Collect name: CONSUMES version: '4.015' - class: Pod::Weaver::Section::RSRCHBOY::RoleParameters name: 'ROLE PARAMETERS' version: '0.075' - class: Pod::Weaver::Section::RSRCHBOY::RequiredAttributes name: 'REQUIRED ATTRIBUTES' version: '0.075' - class: Pod::Weaver::Section::RSRCHBOY::LazyAttributes name: 'LAZY ATTRIBUTES' version: '0.075' - class: Pod::Weaver::Section::Collect name: 'REQUIRED METHODS' version: '4.015' - class: Pod::Weaver::Section::Collect name: ATTRIBUTES version: '4.015' - class: Pod::Weaver::Section::Collect name: 'BEFORE METHOD MODIFIERS' version: '4.015' - class: Pod::Weaver::Section::Collect name: 'AROUND METHOD MODIFIERS' version: '4.015' - class: Pod::Weaver::Section::Collect name: 'AFTER METHOD MODIFIERS' version: '4.015' - class: Pod::Weaver::Section::Collect name: METHODS version: '4.015' - class: Pod::Weaver::Section::Collect name: 'PRIVATE METHODS' version: '4.015' - class: Pod::Weaver::Section::Collect name: FUNCTIONS version: '4.015' - class: Pod::Weaver::Section::Collect name: TYPES version: '4.015' - class: Pod::Weaver::Section::Collect name: 'TEST FUNCTIONS' version: '4.015' - class: Pod::Weaver::Section::Leftovers name: '@RSRCHBOY/Leftovers' version: '4.015' - class: Pod::Weaver::Section::Region name: '@RSRCHBOY/postlude' version: '4.015' - class: Pod::Weaver::Section::SeeAlso name: '@RSRCHBOY/SeeAlso' version: '1.003' - class: Pod::Weaver::Section::Bugs name: '@RSRCHBOY/Bugs' version: '4.015' - class: Pod::Weaver::Section::RSRCHBOY::Authors name: RSRCHBOY::Authors version: '0.075' - class: Pod::Weaver::Section::Contributors name: '@RSRCHBOY/Contributors' version: '0.009' - class: Pod::Weaver::Section::Legal name: '@RSRCHBOY/Legal' version: '4.015' - class: Pod::Weaver::Plugin::Transformer name: '@RSRCHBOY/List' version: '4.015' - class: Pod::Weaver::Plugin::SingleEncoding name: '@RSRCHBOY/SingleEncoding' version: '4.015' name: '@RSRCHBOY/PodWeaver' version: '4.008' - class: Dist::Zilla::Plugin::RemovePrereqs config: Dist::Zilla::Plugin::RemovePrereqs: modules_to_remove: - Moose::Deprecated name: RemovePrereqs version: '6.010' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.010' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.010' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.010' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.010' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.010' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.010' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.010' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.010' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.010' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.010' - class: Dist::Zilla::Plugin::FinderCode name: '@RSRCHBOY/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '6.010' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '6.010' x_authority: cpan:RSRCHBOY x_contributors: - 'Chad Granum ' - 'Karen Etheridge ' x_serialization_backend: 'YAML::Tiny version 1.70' Test-Moose-More-0.050/MANIFEST0000644000175000017500000000306713160632377016034 0ustar rsrchboyrsrchboy# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.010. .travis.yml Changes LICENSE MANIFEST META.json META.yml Makefile.PL README SIGNATURE cpanfile dist.ini lib/Test/Moose/More.pm lib/Test/Moose/More/Utils.pm t/00-check-deps.t t/00-compile.t t/00-report-prereqs.dd t/00-report-prereqs.t t/attribute_options_ok/basic.t t/attribute_options_ok/subtest-wrapper.t t/check_sugar.t t/definition_context.t t/does_metaroles_ok.t t/does_not_metaroles_ok.t t/does_not_ok.t t/does_ok.t t/has_attribute_ok.t t/is_anon_ok.t t/is_class_ok/basic.t t/is_class_ok/moose-meta-attribute-should-be-moosey.t t/is_immutable_ok.t t/is_not_anon_ok.t t/is_role_ok.t t/meta_ok.t t/method_from_pkg_ok.t t/method_is_accessor_ok.t t/method_is_not_accessor_ok.t t/method_not_from_pkg_ok.t t/method_ok.t t/no_meta_ok.t t/pristine_ok.t t/requires_method_ok.t t/subtest-1.t t/validate_attribute/basic.t t/validate_attribute/coerce.t t/validate_attribute/in_roles.t t/validate_attribute/lazy.t t/validate_attribute/required.t t/validate_class/basic.t t/validate_class/metaclasses.t t/validate_class/metaroles.t t/validate_class/methods.t t/validate_role/basic.t t/validate_role/compose.t t/validate_role/metaclasses.t t/validate_role/metaroles.t t/validate_thing/metaclasses.t t/validate_thing/methods.t t/validate_thing/sugar.t t/wrapped/in_roles.t xt/author/eol.t xt/author/no-tabs.t xt/author/pod-coverage.t xt/author/pod-linkcheck.t xt/author/pod-spell.t xt/author/pod-syntax.t xt/release/consistent-version.t xt/release/has-version.t xt/release/minimum-version.t xt/release/no-smart-comments.t Test-Moose-More-0.050/dist.ini0000644000175000017500000000074713160632377016351 0ustar rsrchboyrsrchboyname = Test-Moose-More author = Chris Weyl license = LGPL_2_1 copyright_holder = Chris Weyl copyright_year = 2012 [@RSRCHBOY] tweet = 1 autoprereqs_skip = ^(funcs|TestClass.*|TestRole.*)$ ReportVersions::Tiny.include[0] = Moose ReportVersions::Tiny.include[1] = Class::MOP [RemovePrereqs] ; this was excluded from cpan indexing around 2.0002, so depending on it leads ; to predictably fun mouse-in-a-wheel debugging sessions :\ remove = Moose::Deprecated Test-Moose-More-0.050/LICENSE0000644000175000017500000006015513160632377015711 0ustar rsrchboyrsrchboyThis software is Copyright (c) 2017, 2016, 2015, 2014, 2013, 2012 by Chris Weyl. This is free software, licensed under: The GNU Lesser General Public License, Version 2.1, February 1999 The GNU Lesser General Public License (LGPL) Version 2.1, February 1999 (The master copy of this license lives on the GNU website.) Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Test-Moose-More-0.050/Changes0000640000175000017500000002124413160632377016167 0ustar rsrchboyrsrchboyRevision history for Test-Moose-More 0.050 2017-09-20 22:41:41 CDT-0500 * No code changes, releasing 0.049 as non-trial 0.049-TRIAL 2017-07-30 13:27:51 CDT-0500 * Add definition_context_ok() 0.048 2017-06-17 23:19:13 CDT-0500 * Add method_is_accessor_ok(), method_is_not_accessor_ok() * Fix POD link to Class::MOP::Method::Accessor * Add no_meta_ok() * Simplify some of the logic in our _validate_thing_guts()'s attribute loop * Skip to the next attribute if current one DNE in _thing_guts() attribute loop * Use _thing_name() in _role_wraps(), like everybody else * In POD, wrap more things with C<> vs '', etc. 0.047 2017-04-24 22:48:33 CDT-0500 * Add method_from_pkg_ok(), method_not_from_pkg_ok() * Tests which support subtests (typically validate_*()) now do something sensible when '-subtest => 1' is given. 0.046 2017-04-14 22:51:08 CDT-0500 * Add pristine tests * Add has{,_no}_method_ok() TBT tests * Add: does_not_require_method_ok() has_{,no_}method_from_anywhere_ok() 0.045 2017-03-24 20:34:45 CDT-0500 * Fix a POD command error (=func vs =test) * No code changes, just promoting the changes from 0.044 to GA 0.044-TRIAL 2017-03-21 20:34:29 CDT-0500 * Add metarole/class options to validate_...() * add has_no_method_ok(), which does exactly what you think it does * add no_methods to validate_thing(), incorporating has_no_method_ok() into validate_*() 0.043 2017-02-14 11:56:50 CST-0600 * Depend on TAP::SimpleOutput 0.009 for our tests; no code changes. 0.042 2017-02-13 09:54:58 CST-0600 * Use the subtest bits now in TAP::SimpleOutput * No code changes, just the above test tweak. Overdue release as GA :) 0.041-TRIAL 2016-11-12 20:09:02 CST-0600 * Added a ':validate' export group. * Make -compose subtest messages a little cleaner. * add does_metaroles_ok()! (Not sure why I waited this long...) 0.040-TRIAL 2016-11-10 11:00:24 CST-0600 * Make more things consistent with naming in tests, e.g. "Class's attribute foo" vs "foo", etc. * does_{,not_}ok() now handles metaclasses that don't do roles * has_attribute_ok now honors -subtest 0.039-TRIAL 2016-10-10 18:38:44 CDT-0500 * Use prototypes consistently across our test functions. * Moose metaclasses now pass is_class_ok(). *le sigh* * Role attributes are now validated w.r.t.: + required + lazy * Attribute validation checks are now also tested w.r.t.: + required + lazy 0.038 2016-06-22 13:46:27 CDT-0500 * Eliminate a warning under v5.22+ (github #12) 0.037 2016-01-31 17:02:52 CST-0600 * No code changes -- releasing 0.036 as GA 0.036-TRIAL 2016-01-20 20:48:30 CST-0600 * More test functions now honor "name" overrides, resulting in more sensible output when deeply testing using the validate_*() functions. 0.035 2015-08-26 12:40:38 PDT-0700 * validate_role() will now perform checks on a role to ensure the role intends to wrap methods on application. 0.034-TRIAL 2015-07-29 23:22:49 PDT-0700 * validate_role(), validate_class(), validate_thing(), and validate_attribute() now accept '-subtest', causing them to wrap all the tests they run under a subtest. 0.033 2015-07-29 18:25:51 PDT-0700 * validate_role($role, -compose => 1, ...) will now add a sanity test that the composed subclass actually does $role when composing the arguments to pass to validate_class(). 0.032 2015-07-11 22:47:44 PDT-0700 * Better documentation for most of the validate_*() functions. * Add a -compose option to validate_role(), to handle a common pattern automagically. * When checking attribute traits, we now attempt to resolve them with the appropriate functions from Moose::Util (so that things like native traits are found with a minimum of pain). 0.031 2015-06-30 18:30:27 PDT-0700 * We now export validate_thing() * Add subroutine parameters to the sugar functions. * Add sugar checking to validate_thing() ('sugar => 0|1') 0.030 2015-06-28 01:01:58 PDT-0700 * Add method modifier checks for roles. 0.029 2015-03-29 15:24:40 PDT-0700 * No code changes -- 0.028_01 doesn't seem to have broken anything, so release as non-dev. 0.028_01 2015-03-14 21:03:50 PDT-0700 * Sub::Exporter -> Sub::Exporter::Progressive * normalize test names to end with '_ok' (e.g. is_{role,class} -> is_{role,class}_ok) 0.028 2015-03-12 19:28:22 PDT-0700 * Add is_{,not_}immutable_ok tests * Add 'immutable' check to validate_class 0.027 2015-03-10 20:16:38 PDT-0700 * Drop autobox usage (thanks, @ether!) 0.026 2015-01-18 15:11:22 PST-0800 * **NO CODE CHANGES** Promote 0.025_01 to 0.026. For realz this time. *le sigh* 0.025_02 2015-01-18 15:09:18 PST-0800 * **NO CODE CHANGES** Promote 0.025_01 to 0.026 0.025_01 2014-12-23 23:48:18 PST-0800 * Handle role attributes in a kinder, gentler way * Set our test level correctly when validating attributes 0.025 2014-11-21 11:29:28 PST-0800 * Merge pull request #13 to handle the latest Test::More alphas. Thanks, @exodist! 0.024 2014-05-14 11:58:47 PDT-0700 * validate_thing() now does not try to run subtests against attributes it does not find 0.023 2014-01-21 22:39:47 PST-0800 * fix test error with Moose-2.1200 by adding missing coercions 0.022 2013-11-10 23:16:32 PST-0800 * ...and add an explicit dependency on TAP::SimpleOutput 0.002 0.021 2013-11-10 23:13:27 PST-0800 * Handle Test::More's new output for subtests in 0.98_05+ * Dodge isa_ok()'s output change by rolling our own 0.020 2013-08-01 07:33:57 PDT-0700 * Drop Perl6::Junction in favor of Syntax::Keyword::Junction Same thing -- essentially, AFAICT -- except that we don't get 'smartmatch operator is experimental' warnings in 5.18 :) 0.019 2013-01-21 07:35:07 PST-0800 * no code changes, netadata fixup only -- stop requiring Moose::Deprecated, as it is no longer indexed. 0.018 2013-01-09 07:48:01 PST8PDT * test if an attribute should coerce or not 0.017 2012-10-28 15:38:16 PST8PDT * Instead of failing on "unknown attribute options" when performing attribute validation checks, first look to see if they're actually an attribute on the attribute metaclass; this is a fairly common situation when attribute traits are used. * Check if an attribute is required or not. 0.016 2012-10-21 15:03:32 PST8PDT * add is_anon(), is_not_anon() * allow anonymous => 1|0 in validate_thing() (though not documented) * use validate_class() when checking attributes with validate_class() 0.015 2012-10-20 17:00:59 PST8PDT * NO CODE CHANGES from 0.014. We should be at a good point where the newer attribute checking tests are useable and won't need to change in any incompatible ways (hopefully!). 0.014 2012-10-04 20:28:49 PST8PDT * TRIAL release * better tests for our new validate_attribute and attribute_options_ok * use subtests when checking attributes in validate_class * drop t/funcs.pm in favor of TAP::SimpleOutput 0.013 2012-09-30 13:59:22 PST8PDT * TRIAL release * mark traits as a valid attribute option to test for, but not currently checked (skipped, that is). * Handle validating an attribute as a "thing" and its options at the same time by interperting all keys of options to check that start with '-' as a key for validate_thing(). This should allow the validate_*'s to pass off to validate_attribute() without much violence. 0.012 2012-09-29 23:18:12 PST8PDT * TRIAL release * add first pass at validate_attribute(), adapted from MooseX::AttributeShortcuts' test suite 0.011 2012-08-26 22:32:59 America/Los_Angeles * drop AttributeShortcuts req from t/, or we may run into build issues 0.010 2012-08-24 15:01:48 America/Los_Angeles * add has_required_methods_ok() * add required_methods() to validate_role(), and test 0.009 2012-04-26 22:34:16 America/Los_Angeles * initial (undocumented) attribute meta-validation via validate_*(). Undocumented until we settle on a coherent way to do this across the board. 0.008 2012-04-13 13:52:33 America/Los_Angeles * add has_attribute_ok, and extended to deal with attributes in roles, as the prior method seems to have stopped working. 0.007 2012-04-11 17:52:41 America/Los_Angeles * add does_not_ok() * add 'does_not' option to validate_thing()/etc 0.006 2012-04-07 23:19:40 America/Los_Angeles * fix POD and actually implement more of validate_thing() 0.005 2012-02-05 06:14:58 America/Los_Angeles * export Test::Moose::with_immutable() 0.004 2012-02-02 16:20:01 America/Los_Angeles * add does_ok(), meta_ok() 0.003 2012-01-23 15:15:39 America/Los_Angeles 0.002 2012-01-21 20:07:26 America/Los_Angeles * add check_sugar_ok and check_sugar_removed_ok 0.001 2012-01-21 10:52:14 America/Los_Angeles * initial release Test-Moose-More-0.050/README0000644000175000017500000005107713160632377015567 0ustar rsrchboyrsrchboyNAME Test::Moose::More - More tools for testing Moose packages VERSION This document describes version 0.050 of Test::Moose::More - released September 20, 2017 as part of Test-Moose-More. SYNOPSIS use Test::Moose::More; is_class_ok 'Some::Class'; is_role_ok 'Some::Role'; has_method_ok 'Some::Class', 'foo'; # ... etc DESCRIPTION This package contains a number of additional tests that can be employed against Moose classes/roles. It is intended to replace Test::Moose in your tests, and re-exports any tests that it has and we do not, yet. Export Groups By default, this package exports all test functions. You can be more selective, however, and there are a number of export groups (aside from the default :all) to help you achieve those dreams! :all All exportable functions. :validate "validate_attribute", "validate_class", "validate_role", "validate_thing" TEST FUNCTIONS meta_ok $thing Tests $thing to see if it has a metaclass; $thing may be the class name or instance of the class you wish to check. Passes if $thing has a metaclass. no_meta_ok $thing Tests $thing to see if it does not have a metaclass; $thing may be the class name or instance of the class you wish to check. Passes if $thing does not have a metaclass. does_ok $thing, < $role | \@roles >, [ $message ] Checks to see if $thing does the given roles. $thing may be the class name or instance of the class you wish to check. Note that the message will be taken verbatim unless it contains %s somewhere; this will be replaced with the name of the role being tested for. does_not_ok $thing, < $role | \@roles >, [ $message ] Checks to see if $thing does not do the given roles. $thing may be the class name or instance of the class you wish to check. Note that the message will be taken verbatim unless it contains %s somewhere; this will be replaced with the name of the role being tested for. has_attribute_ok $thing, $attribute_name, [ $message ] Checks $thing for an attribute named $attribute_name; $thing may be a class name, instance, or role name. has_method_ok $thing, @methods Queries $thing's metaclass to see if $thing has the methods named in @methods. Note: This does not include inherited methods; see "has_method" in Class::MOP::Class. has_no_method_ok $thing, @methods Queries $thing's metaclass to ensure $thing does not provide the methods named in @methods. Note: This does not include inherited methods; see "has_method" in Class::MOP::Class. has_method_from_anywhere_ok $thing, @methods Queries $thing's metaclass to see if $thing has the methods named in @methods. Note: This does include inherited methods; see "find_method_by_name" in Class::MOP::Class. has_no_method_from_anywhere_ok $thing, @methods Queries $thing's metaclass to ensure $thing does not provide the methods named in @methods. Note: This does include inherited methods; see "find_method_by_name" in Class::MOP::Class. method_from_pkg_ok $thing, $method, $orig_pkg Given a thing (role, class, etc) and a method, test that it originally came from $orig_pkg. method_not_from_pkg_ok $thing, $method, $orig_pkg Given a thing (role, class, etc) and a method, test that it did not come from $orig_pkg. method_is_accessor_ok $thing, $method Given a thing (role, class, etc) and a method, test that the method is an accessor -- that is, it descends from Class::MOP::Method::Accessor. method_is_not_accessor_ok $thing, $method Given a thing (role, class, etc) and a method, test that the method is not an accessor -- that is, it does not descend from Class::MOP::Method::Accessor. definition_context_ok $meta, \%dc Validates the definition context of a metaclass instance. This is a strict comparison. role_wraps_around_method_ok $role, @methods Queries $role's metaclass to see if $role wraps the methods named in @methods with an around method modifier. role_wraps_before_method_ok $role, @methods Queries $role's metaclass to see if $role wraps the methods named in @methods with an before method modifier. role_wraps_after_method_ok $role, @methods Queries $role's metaclass to see if $role wraps the methods named in @methods with an after method modifier. requires_method_ok $thing, @methods Queries $thing's metaclass to see if $thing requires the methods named in @methods. Note that this really only makes sense if $thing is a role. does_not_require_method_ok $thing, @methods Queries $thing's metaclass to ensure $thing does not require the methods named in @methods. Note that this really only makes sense if $thing is a role. is_immutable_ok $thing Passes if $thing is immutable. is_not_immutable_ok $thing Passes if $thing is not immutable; that is, is mutable. is_pristine_ok $thing Passes if $thing is pristine. See "is_pristine" in Class::MOP::Class. is_not_pristine_ok $thing Passes if $thing is not pristine. See "is_pristine" in Class::MOP::Class. is_role_ok $thing Passes if $thing's metaclass is a Moose::Meta::Role. is_class_ok $thing Passes if $thing's metaclass is a Moose::Meta::Class. is_anon_ok $thing Passes if $thing is "anonymous". is_not_anon_ok $thing Passes if $thing is not "anonymous". check_sugar_removed_ok $thing Ensures that all the standard Moose sugar is no longer directly callable on a given package. check_sugar_ok $thing Checks and makes sure a class/etc can still do all the standard Moose sugar. does_metaroles_ok $thing => { $mop => [ @traits ], ... }; Validate the metaclasses associated with a class/role metaclass. e.g., if I wanted to validate that the attribute trait for MooseX::AttributeShortcuts is actually applied, I could do this: { package TestClass; use Moose; use MooseX::AttributeShortcuts; } use Test::Moose::More; use Test::More; does_metaroles_ok TestClass => { attribute => ['MooseX::AttributeShortcuts::Trait::Attribute'], }; done_testing; This function will accept either class or role metaclasses for $thing. The MOPs available for classes (Moose::Meta::Class) are: class attribute method wrapped_method instance constructor destructor The MOPs available for roles (Moose::Meta::Role) are: role attribute method required_method wrapped_method conflicting_method application_to_class application_to_role application_to_instance applied_attribute Note! Neither this function nor does_not_metaroles_ok() attempts to validate that the MOP type passed in is a member of the above lists. There's no gain here in implementing such a check, and a negative to be had: specifying an invalid MOP type will result in immediate explosions, while it's entirely possible other MOP types will be added (either to core, via traits, or "let's subclass Moose::Meta::Class/etc and implement something new"). does_not_metaroles_ok $thing => { $mop => [ @traits ], ... }; As with "does_metaroles_ok", but test that the metaroles are not consumed, a la "does_not_ok". attribute_options_ok Validates that an attribute is set up as expected; like validate_attribute(), but only concerns itself with attribute options. Note that some of these options will skip if used against attributes defined in a role. * -subtest => 'subtest name...' If set, all tests run (save the first, "does this thing even have this attribute?" test) will be wrapped in a subtest, the name of which will be whatever -subtest is set to. * is => ro|rw Tests for reader/writer options set as one would expect. * isa => ... Validates that the attribute requires its value to be a given type. * does => ... Validates that the attribute requires its value to do a given role. * builder => '...' Validates that the attribute expects the method name given to be its builder. * default => ... Validates that the attribute has the given default. * init_arg => '...' Validates that the attribute has the given initial argument name. * lazy => 0|1 Validates that the attribute is/isn't lazy. * required => 0|1 Validates that setting the attribute's value is/isn't required. VALIDATION METHODS validate_thing Runs a bunch of tests against the given $thing, as defined: validate_thing $thing => ( attributes => [ ... ], methods => [ ... ], isa => [ ... ], # ensures sugar is/is-not present sugar => 0, # ensures $thing does these roles does => [ ... ], # ensures $thing does not do these roles does_not => [ ... ], ); $thing can be the name of a role or class, an object instance, or a metaclass. * -subtest => 'subtest name...' If set, all tests run will be wrapped in a subtest, the name of which will be whatever -subtest is set to. * isa => [ ... ] A list of superclasses thing should have. * anonymous => 0|1 Check to see if the class is/isn't anonymous. * does => [ ... ] A list of roles the thing should do. * does_not => [ ... ] A list of roles the thing should not do. * attributes => [ ... ] The attributes list specified here is in the form of a list of names, each optionally followed by a hashref of options to test the attribute for; this hashref takes the same arguments "validate_attribute" does. e.g.: validate_thing $thing => ( attributes => [ 'foo', 'bar', baz => { is => 'ro', ... }, 'bip', ], ); * methods => [ ... ] A list of methods the thing should have; see "has_method_ok". * no_methods => [ ... ] A list of methods the thing should not have; see "has_no_method_ok". * sugar => 0|1 Ensure that thing can/cannot do the standard Moose sugar. * metaclasses => { $mop => { ... }, ... } Validates this thing's metaclasses: that is, given a MOP type (e.g. class, attribute, method, ...) and a hashref, find the associated metaclass of the given type and invoke "validate_thing" on it, using the hashref as options for validate_thing(). e.g. validate_thing 'TestClass' => ( metaclasses => { attribute => { isa => [ 'Moose::Meta::Attribute' ], does => [ 'MetaRole::attribute' ], }, }, ); ...yields: # Subtest: Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1 ok 1 - TestClass's attribute metaclass has a metaclass ok 2 - TestClass's attribute metaclass is a Moose class ok 3 - TestClass's attribute metaclass isa Moose::Meta::Attribute ok 4 - TestClass's attribute metaclass does MetaRole::attribute 1..4 ok 1 - Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1 Note that validate_class() and validate_role() implement this using class_metaclasses and role_metaclasses, respectively. validate_role The same as validate_thing(), but ensures $thing is a role, and allows for additional role-specific tests. validate_role $thing => ( required_methods => [ ... ], # ...and all other options from validate_thing() ); * -compose => 0|1 When true, attempt to compose the role into an anonymous class, then use it to run "validate_class". The options we're given are passed to validate_class() directly, except that any required_methods entry is removed and its contents pushed onto methods. (A stub method for each entry in required_methods will also be created in the new class.) e.g.: ok 1 - TestRole has a metaclass ok 2 - TestRole is a Moose role ok 3 - TestRole requires method blargh ok 4 - TestRole does TestRole ok 5 - TestRole does not do TestRole::Two ok 6 - TestRole has method method1 ok 7 - TestRole has an attribute named bar # Subtest: role composed into Moose::Meta::Class::__ANON__::SERIAL::1 ok 1 - TestRole's composed class has a metaclass ok 2 - TestRole's composed class is a Moose class ok 3 - TestRole's composed class does TestRole ok 4 - TestRole's composed class does not do TestRole::Two ok 5 - TestRole's composed class has method method1 ok 6 - TestRole's composed class has method blargh ok 7 - TestRole's composed class has an attribute named bar 1..7 ok 8 - role composed into Moose::Meta::Class::__ANON__::SERIAL::1 1..8 * -subtest => 'subtest name...' If set, all tests run will be wrapped in a subtest, the name of which will be whatever -subtest is set to. * required_methods => [ ... ] A list of methods the role requires a consuming class to supply. * before => [ ... ] A list of methods the role expects to wrap before, on application to a class. See "before" in Moose for information on before method modifiers. * around => [ ... ] A list of methods the role expects to wrap around, on application to a class. See "around" in Moose for information on around method modifiers. * after => [ ... ] A list of methods the role expects to wrap after, on application to a class. See "after" in Moose for information on after method modifiers. * role_metaroles => { $mop => [ $role, ... ], ... } Checks metaclasses to ensure the given metaroles are applied. See "does_metaroles_ok". * no_role_metaroles => { $mop => [ $role, ... ], ... } Checks metaclasses to ensure the given metaroles are applied. See "does_not_metaroles_ok". * role_metaclasses => { $mop => { ... }, ... } Validates this role's metaclasses: that is, given a MOP type (e.g. role, attribute, method, ...) and a hashref, find the associated metaclass of the given type and invoke "validate_thing" on it, using the hashref as options for validate_thing(). e.g. validate_role 'TestRole' => ( metaclasses => { attribute => { isa => [ 'Moose::Meta::Attribute' ], does => [ 'MetaRole::attribute' ], }, }, ); ...yields: # Subtest: Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1 ok 1 - TestRole's attribute metaclass has a metaclass ok 2 - TestRole's attribute metaclass is a Moose class ok 3 - TestRole's attribute metaclass isa Moose::Meta::Attribute ok 4 - TestRole's attribute metaclass does MetaRole::attribute 1..4 ok 1 - Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1 Note that validate_class() and validate_role() implement this using class_metaclasses and role_metaclasses, respectively. * class_metaclasses => { $mop => { ... }, ... } As with role_metaclasses, above, except that this option is only used if -compose is also specified. validate_class The same as validate_thing(), but ensures $thing is a class, and allows for additional class-specific tests. validate_class $thing => ( isa => [ ... ], attributes => [ ... ], methods => [ ... ], # ensures sugar is/is-not present sugar => 0, # ensures $thing does these roles does => [ ... ], # ensures $thing does not do these roles does_not => [ ... ], # ...and all other options from validate_thing() ); * -subtest => 'subtest name...' If set, all tests run will be wrapped in a subtest, the name of which will be whatever -subtest is set to. * immutable => 0|1 Checks the class to see if it is/isn't immutable. * class_metaroles => { $mop => [ $role, ... ], ... } Checks metaclasses to ensure the given metaroles are applied. See "does_metaroles_ok". * no_class_metaroles => { $mop => [ $role, ... ], ... } Checks metaclasses to ensure the given metaroles are applied. See "does_not_metaroles_ok". * class_metaclasses => { $mop => { ... }, ... } Validates this class' metaclasses: that is, given a MOP type (e.g. role, attribute, method, ...) and a hashref, find the associated metaclass of the given type and invoke "validate_thing" on it, using the hashref as options for validate_thing(). e.g. validate_class 'TestClass' => ( metaclasses => { attribute => { isa => [ 'Moose::Meta::Attribute' ], does => [ 'MetaRole::attribute' ], }, }, ); ...yields: ok 1 - TestClass has a metaclass ok 2 - TestClass is a Moose class # Subtest: Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1 ok 1 - TestClass's attribute metaclass has a metaclass ok 2 - TestClass's attribute metaclass is a Moose class ok 3 - TestClass's attribute metaclass isa Moose::Meta::Attribute ok 4 - TestClass's attribute metaclass does MetaRole::attribute 1..4 ok 3 - Checking the attribute metaclass, Moose::Meta::Class::__ANON__::SERIAL::1 validate_attribute validate_attribute() allows you to test how an attribute looks once built and attached to a class. Let's say you have an attribute defined like this: has foo => ( traits => [ 'TestRole' ], is => 'ro', isa => 'Int', builder => '_build_foo', lazy => 1, ); You can use validate_attribute() to ensure that it's built out in the way you expect: validate_attribute TestClass => foo => ( # tests the attribute metaclass instance to ensure it does the roles -does => [ 'TestRole' ], # tests the attribute metaclass instance's inheritance -isa => [ 'Moose::Meta::Attribute' ], # for demonstration's sake traits => [ 'TestRole' ], isa => 'Int', does => 'Bar', handles => { }, reader => 'foo', builder => '_build_foo', default => undef, init_arg => 'foo', lazy => 1, required => undef, ); Options passed to validate_attribute() prefixed with - test the attribute's metaclass instance rather than a setting on the attribute; that is, -does ensures that the metaclass does a particular role (e.g. MooseX::AttributeShortcuts), while does tests the setting of the attribute to require the value do a given role. This function takes all the options "attribute_options_ok" takes, as well as the following: * -subtest => 'subtest name...' If set, all tests run will be wrapped in a subtest, the name of which will be whatever -subtest is set to. SEE ALSO Please see those modules/websites for more information related to this module. * Test::Moose BUGS Please report any bugs or feature requests on the bugtracker website https://github.com/RsrchBoy/Test-Moose-More/issues When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. AUTHOR Chris Weyl CONTRIBUTORS * Chad Granum * Karen Etheridge COPYRIGHT AND LICENSE This software is Copyright (c) 2017, 2016, 2015, 2014, 2013, 2012 by Chris Weyl. This is free software, licensed under: The GNU Lesser General Public License, Version 2.1, February 1999