Moose/Sweep/Step/Phase.pm

filter: Statementstmt 66.6% 12 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod n/a totaltotal 63.6% 14 / 22 SCAR 7.6
CC
2
Cov
67%
_phase_setter
6.0
_build_setter
2.0
BEGIN
1.0
CRAP 2.1
« Moose/Sweep/Step/Frequency.pm ↑ Summary Moose/Sweep/Step/Power.pm »
1 package Lab::Moose::Sweep::Step::Phase;
2 1 $Lab::Moose::Sweep::Step::Phase::VERSION = '3.881';
3 #ABSTRACT: Phase sweep.
4  
5 1 ▶use v5.20;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7  
8 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 extends 'Lab::Moose::Sweep::Step';
11  
12 1 has filename_extension =>
13 ( is => 'ro', isa => 'Str', default => 'Phase=' );
14  
15 1 has setter => ( is => 'ro', isa => 'CodeRef', builder => '_build_setter' );
16  
17 1 has instrument =>
18 ( is => 'ro', isa => 'ArrayRefOfInstruments', coerce => 1, required => 1 );
19  
20 sub _build_setter {
21 0 ▶ return \&_phase_setter;
Subroutine _build_setter: not called CC=1 SCAR=6.9
22 }
23  
24 sub _phase_setter {
25 0 ▶ my $self = shift;
Subroutine _phase_setter: not called CC=2 SCAR=17.9
26 0 my $value = shift;
27 0 foreach (@{$self->instrument}) {
28 0 $_->set_phase( value => $value );
29 }
30 }
31  
32 1 __PACKAGE__->meta->make_immutable();
33 1 1;
34  
35 __END__
36  
37 =pod
38  
39 =encoding UTF-8
40  
41 =head1 NAME
42  
43 Lab::Moose::Sweep::Step::Phase - Phase sweep.
44  
45 =head1 VERSION
46  
47 version 3.881
48  
49 =head1 Description
50  
51 Step sweep with following properties:
52  
53 =over
54  
55 =item *
56  
57 Uses instruments C<set_phase> method to change the phase.
58  
59 =item *
60  
61 Default filename extension: C<'Phase='>
62  
63 =back
64  
65 =head1 COPYRIGHT AND LICENSE
66  
67 This software is copyright (c) 2023 by the Lab::Measurement team; in detail:
68  
69 Copyright 2021 Fabian Weinelt
70  
71  
72 This is free software; you can redistribute it and/or modify it under
73 the same terms as the Perl 5 programming language system itself.
74  
75 =cut
« Moose/Sweep/Step/Frequency.pm ↑ Summary Moose/Sweep/Step/Power.pm »