Test::Stream::Context
The context object is the Test::Stream linchpin.
The context object ties everything together:
- Finds the current hub for you.
- Tracks the file+line number for error reporting.
- Makes it possible to nest tools sanely (replaces $Level).
- Primary interface to generating event objects.
- Has several hooks tools can use.
Conception of the context object happened fairly early in development.
The idea started as a way to address the shortcommings of $Level.
Schwern and I had conversed about how awful $Level was several times
with no resolution. One day the concept came to me, much of the
Test::Stream architecture is a result of the context object concept.