- Loader
-
The Test::Stream Loader
- Test::Stream (the package) is just a loader.
- You MUST choose at least 1 plugin or bundle.
- There are no defaults.
- You are not required to use the loader.
- Plugins
-
Plugins
- A tool for Test::Stream will typically be written as a plugin.
- Plugins typically live in the Test::Stream::Plugin::* namespace.
- Plugins typically export testing functions.
- Plugins can also be used to configure the internals.
- You can blacklist a plugin to ensure it does not load
- Bundles
-
Bundles
- Bundles are lists of plugins and their load options.
- Anyone can write a bundle.
- A bundle is a way to define a consistent set of plugins.
- Bundles should not define or provide their own tools.
Example Bundle
Project Bundles
You can create project specific bundles in t/lib. These bundles will
not be installed, but are usable in all the projects tests.
- Options
-
Options
- Any all lowercase item passed to import is an option.
- Options are loader-specific.
- Loaders can define or redefine any options they want.
- Options can effect the parsing of the argument list.
- Test::Stream has a handful of options that are plugin shortcuts.
- Test::Stream subclasses define options as methods.
- Use of an unrecognized option produces and exception.
existing options
- class
- Shortcut for the 'Class' plugin.
- skip_without
- Shortcut for the SkipWithout plugin.
- srand
- Shortcut to the SRand plugin.
In this case these are shortcuts because supplying arguments to the
plugins is easier.
- Subclass
-
Subclass
- You can subclass Test::Stream to write your own loader.
- Custom loaders can specify defaults.
- Custom loaders can add or replace options.
- No Sugar
-
Hold the sugar!
The loader is optional, you do not need to use it!