Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move TAP logic out of events #64

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Move TAP logic out of events #64

wants to merge 10 commits into from

Conversation

exodist
Copy link
Member

@exodist exodist commented Nov 22, 2015

  • Move TAP logic from events to TAP formatter
  • Port tests from events to the TAP formatter tests
  • Maintain backcompat
  • Deprecate to_tap
  • Allow custom event support in TAP formatter

unless $convert && ref($convert) eq 'CODE';
$CONVERTERS{$type} = $convert;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q) Is it expected nobody will wish to redefine how a TAP event is rendered?

I somehow get the impression somebody may wish to inject their own custom formatter for an existing event, but this may not be the right place for this.

If so: Comments to that effect should accompany the source for source divers, and POD documentation for register_event should be blindingly clear about this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want your own formatter you write a new formatter. Making changes to the TAP formatter is not advised.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*making changes to how the tap formatter renders pre-defined events is not advised. Adding new-custom events is not scary. If you want a "TAP" formatter that handles existing event types differently then you subclass the existing TAP formatter and tell Test::Stream to use your custom formatter.

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