OpenTracing::Implementation::Interface::Bootstrap - Ensure we do the right thing
package My::OpenTracing::Implementation sub bootstrap { my $class = shift; my @args = @_; # whatever ... my $tracer = ... return $tracer } BEGIN { use Role::Tiny::With; with 'OpenTracing::Implementation::Interface::Bootstrap' if $ENV{OPENTRACING_INTERFACE} } # check at compile time, perl -c will work 1;
This 'role' describes the interface needed for OpenTracing::Implementation bootstraps.
It does so be wrapping typechecks around a required method: bootstrap
bootstrap
The below mentioned methods MUST be implemented by the consuming class:
A class method, that accepts further arguments to bootstrap or set-up a specific implementation
To install OpenTracing::Implementation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenTracing::Implementation
CPAN shell
perl -MCPAN -e shell install OpenTracing::Implementation
For more information on module installation, please visit the detailed CPAN module installation guide.