blib/lib/WebService/Mattermost/V4/API/Role/NewRelatedResource.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 10 | 10 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 13 | 14 | 92.8 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package WebService::Mattermost::V4::API::Role::NewRelatedResource; 2: 3: use Moo::Role; 4: 5: use WebService::Mattermost::Helper::Alias 'v4'; 6: 7: ################################################################################ 8: 9: sub new_related_resource { 10: my $self = shift; 11: my $base = shift; 12: my $resource = shift; 13: 14: return v4($resource)->new({ 15: api => $self->api, 16: auth_token => $self->auth_token, 17: base_url => $self->base_url, 18: resource => $base, 19: }); 20: } 21: 22: ################################################################################ 23: 24: 1; 25: 26: __END__ 27: 28: =pod 29: 30: =encoding UTF-8 31: 32: =head1 NAME 33: 34: WebService::Mattermost::V4::API::Role::NewRelatedResource 35: 36: =head1 VERSION 37: 38: version 0.28 39: 40: =head1 AUTHOR 41: 42: Mike Jones <mike@netsplit.org.uk> 43: 44: =head1 COPYRIGHT AND LICENSE 45: 46: This software is Copyright (c) 2020 by Mike Jones. 47: 48: This is free software, licensed under: 49: 50: The MIT (X11) License 51: 52: =cut 53: |