File Coverage

blib/lib/Lab/Moose/Sweep/Step/Phase.pm
Criterion Covered Total %
statement 5 11 45.4
branch n/a
condition n/a
subroutine 2 4 50.0
pod n/a
total 7 15 46.6


line stmt bran cond sub pod time code
1             package Lab::Moose::Sweep::Step::Phase;
2             $Lab::Moose::Sweep::Step::Phase::VERSION = '3.881';
3             #ABSTRACT: Phase sweep.
4              
5 1     1   2068 use v5.20;
  1         5  
6              
7              
8 1     1   7 use Moose;
  1         2  
  1         7  
9              
10             extends 'Lab::Moose::Sweep::Step';
11              
12             has filename_extension =>
13             ( is => 'ro', isa => 'Str', default => 'Phase=' );
14              
15             has setter => ( is => 'ro', isa => 'CodeRef', builder => '_build_setter' );
16              
17             has instrument =>
18             ( is => 'ro', isa => 'ArrayRefOfInstruments', coerce => 1, required => 1 );
19              
20             sub _build_setter {
21 0     0     return \&_phase_setter;
22             }
23              
24             sub _phase_setter {
25 0     0     my $self = shift;
26 0           my $value = shift;
27 0           foreach (@{$self->instrument}) {
  0            
28 0           $_->set_phase( value => $value );
29             }
30             }
31              
32             __PACKAGE__->meta->make_immutable();
33             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