Paws-Net-MultiplexCaller

 view release on metacpan or  search on metacpan

lib/Paws/Net/MultiplexCaller.pm  view on Meta::CPAN

package Paws::Net::MultiplexCaller;
  use Moose;
  with 'Paws::Net::CallerRole';

  our $VERSION = '0.03';

  # TODO: HashRef of things that do Paws::Net::CallerRole
  has caller_for => (is => 'ro', isa => 'HashRef', required => 1);
  # TODO: thing that does Paws::Net::CallerRole or Undef
  has default_caller => (is => 'ro', isa => 'Object');

  sub get_implementation {
    my ($self, $service) = @_;
    return $self->caller_for->{ $service } if (defined $self->caller_for->{ $service });
    return $self->default_caller if (defined $self->default_caller);
    die "Can't find a caller for $service";
  }



( run in 0.691 second using v1.01-cache-2.11-cpan-5f2e87ce722 )