The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

OpenTracing::Implementation::Interface::Bootstrap - Ensure we do the right thing

SYNOPSIS

package My::OpenTracing::Implementation

sub bootstrap_tracer {
    my $class = shift;
    
    my @args = @_; # whatever
    
    ...
    
    my $tracer = ...
    
    return $tracer
}

BEGIN {
    use Role::Tiny::With;
    with 'OpenTracing::Implementation::Interface::Bootstrap';
} # check at compile time, perl -c will work

1;

DESCRIPTION

This 'role' describes the interface needed for OpenTracing::Implementation bootstraps.

It does so be wrapping typechecks around a required method: bootstrap

REQUIRED METHODS

The below mentioned methods MUST be implemented by the consuming class:

bootstrap

A class method, that accepts further arguments to bootstrap or set-up a specific implementation