| 1 | package Thrift::IDL::Service; | ||||||||||
| 2 | |||||||||||
| 3 | =head1 NAME | ||||||||||
| 4 | |||||||||||
| 5 | Thrift::IDL::Service | ||||||||||
| 6 | |||||||||||
| 7 | =head1 DESCRIPTION | ||||||||||
| 8 | |||||||||||
| 9 | Inherits from L<Thrift::IDL::Definition> | ||||||||||
| 10 | |||||||||||
| 11 | =cut | ||||||||||
| 12 | |||||||||||
| 13 | 4 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | 4 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | 4 | ▶ | use base qw(Thrift::IDL::Definition); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 16 | 4 | __PACKAGE__->mk_accessors(qw(name extends children)); | |||||||||
| 17 | |||||||||||
| 18 | =head1 METHODS | ||||||||||
| 19 | |||||||||||
| 20 | =head2 name | ||||||||||
| 21 | |||||||||||
| 22 | =head2 extends | ||||||||||
| 23 | |||||||||||
| 24 | =head2 children | ||||||||||
| 25 | |||||||||||
| 26 | Scalar accessors | ||||||||||
| 27 | |||||||||||
| 28 | =head2 methods | ||||||||||
| 29 | |||||||||||
| 30 | Returns array ref of all L<Thrift::IDL::Method> children | ||||||||||
| 31 | |||||||||||
| 32 | =cut | ||||||||||
| 33 | |||||||||||
| 34 | 3 | ▶ | sub methods { | ||||||||
|
Subroutine
methods: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 35 | 3 | my $self = shift; | |||||||||
| 36 | 3 | $self->children_of_type('Thrift::IDL::Method'); | |||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | =head2 method_named ($name) | ||||||||||
| 40 | |||||||||||
| 41 | Return named method | ||||||||||
| 42 | |||||||||||
| 43 | =cut | ||||||||||
| 44 | |||||||||||
| 45 | 3 | ▶ | sub method_named { | ||||||||
|
Subroutine
method_named: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 46 | 3 | my ($self, $name) = @_; | |||||||||
| 47 | 3 | $self->array_search($name, 'methods', 'name'); | |||||||||
| 48 | } | ||||||||||
| 49 | |||||||||||
| 50 | 4 | ▶ | sub to_str { | ||||||||
|
Subroutine
to_str: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 51 | 4 | my $self = shift; | |||||||||
| 52 | 4 | ▶ | return $self->name . ($self->extends ? ' (extends ' . $self->extends . ') ' : ''); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 53 | } | ||||||||||
| 54 | |||||||||||
| 55 | 4 | 1; | |||||||||