Moose/Sweep/Step/Frequency.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%
_frq_setter
6.0
_build_setter
2.0
BEGIN
1.0
CRAP 2.1
« Moose/Instrument/RS_ZNL.pm ↑ Summary Moose/Sweep/Step/Phase.pm »
1 package Lab::Moose::Sweep::Step::Frequency;
2 1 $Lab::Moose::Sweep::Step::Frequency::VERSION = '3.881';
3 #ABSTRACT: Frequency 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 => 'Frequency=' );
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 \&_frq_setter;
Subroutine _build_setter: not called CC=1 SCAR=6.9
22 }
23  
24 sub _frq_setter {
25 0 ▶ my $self = shift;
Subroutine _frq_setter: not called CC=2 SCAR=17.9
26 0 my $value = shift;
27 0 foreach (@{$self->instrument}) {
28 0 $_->set_frq( 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::Frequency - Frequency 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_frq> method to change the frequency.
58  
59 =item *
60  
61 Default filename extension: C<'Frequency='>
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 2018 Simon Reinhardt
70 2020 Andreas K. Huettel
71 2021 Fabian Weinelt
72  
73  
74 This is free software; you can redistribute it and/or modify it under
75 the same terms as the Perl 5 programming language system itself.
76  
77 =cut
« Moose/Instrument/RS_ZNL.pm ↑ Summary Moose/Sweep/Step/Phase.pm »