Skip to content

Conversation

@paulsalcido
Copy link
Owner

Most important:

  • Get rid of global %_Test

Change method calls to instance methods rather than package subs

  • Change methods from _method($self) to $self->_method
  • _run_method (should make this public, it's something where logging could be wrapped - think of it as an event as well as a method.
  • _method_info (I don't know who would want to override this, but someone might. This might also allow for new behaviors that might not be expected.
  • _test_info

Finally

  • Break out the individual tests for each class, so that a classes test run can be wrapped individually in a role based way. This allows for more flexibility in overriding/changing behavior.

This allows for Moose::Role, or other such behavior, to override
either a) the instances of this class, or b) class behavior via
Moose::Meta::Class->create.

This should also help eliminate the 'internals broken problem'
that can occur during some inheritance paths.
Allow sub classes and roles to override the way that Test::Class
works should someone need to do so.

Modifying behavior (additional logging, etc), should be easy and
not require the modification of Test::Class to be able to do it.
Demonstrate a few benefits of the changes.
This modification allows someone trying to add
debugging on a per class basis, or to override
behavior in various ways that I might not be
able to anticipate.
@paulsalcido
Copy link
Owner Author

I think that I've got this good now.

paulsalcido added a commit that referenced this pull request Nov 15, 2013
Allow Moose::Role style modifications to class instances
@paulsalcido paulsalcido merged commit 5d14c10 into master Nov 15, 2013
@paulsalcido paulsalcido deleted the allow-role-modifications branch November 15, 2013 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants