| 1 | package SPVM::Builder::ConfigBuilder; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 1 | ▶ | use Carp (); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.6
Pod
documented
| |||||||||||||||||||||
| 8 | 1 | my $class = shift; | |||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 1 | my $self = { | |||||||||||||||||||
| 11 | @_ | ||||||||||||||||||||
| 12 | }; | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 1 | ▶ | return bless $self, ref $class || $class; | ||||||||||||||||||
|
Condition33%1/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 15 | } | ||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 0 | ▶ | sub build_config { Carp::confess("Not yet implemented.") } | ||||||||||||||||||
|
Subroutine
build_config: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | 1 | 1; | |||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | =head1 Name | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | SPVM::Builder::ConfigBuilder - Config Builder | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | =head1 Description | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | SPVM::Builder::ConfigBuilder class is the base class of a config builder. | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | =head1 Usage | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | package SPVM::MyClass::ConfigBuilder; | ||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | use base 'SPVM::Builder::ConfigBuilder'; | ||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | sub build_config { | ||||||||||||||||||||
| 36 | my ($self) = @_; | ||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | # Build config | ||||||||||||||||||||
| 39 | |||||||||||||||||||||
| 40 | return $config; | ||||||||||||||||||||
| 41 | } | ||||||||||||||||||||
| 42 | |||||||||||||||||||||
| 43 | 1; | ||||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | =head1 Class Methods | ||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | =head2 new | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | my $config_builder = SPVM::Builder::ConfigBuilder->new(%options); | ||||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | Create a new object blessed by the class name of the invocant and returns it. | ||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | =head1 Instance Methods | ||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | =head2 build_config | ||||||||||||||||||||
| 56 | |||||||||||||||||||||
| 57 | my $config = $config_builder->build_config; | ||||||||||||||||||||
| 58 | |||||||||||||||||||||
| 59 | Builds an L<SPVM::Builder::Config> object and returns it. | ||||||||||||||||||||
| 60 | |||||||||||||||||||||
| 61 | This method must be implemented in a child class. | ||||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | =head1 Examples | ||||||||||||||||||||
| 64 | |||||||||||||||||||||
| 65 | =over 2 | ||||||||||||||||||||
| 66 | |||||||||||||||||||||
| 67 | =item * L<SPVM::Net::SSLeay::ConfigBuilder> | ||||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | =back | ||||||||||||||||||||
| 70 | |||||||||||||||||||||
| 71 | =head1 Copyright & License | ||||||||||||||||||||
| 72 | |||||||||||||||||||||
| 73 | Copyright (c) 2023 Yuki Kimoto | ||||||||||||||||||||
| 74 | |||||||||||||||||||||
| 75 | MIT License | ||||||||||||||||||||