File Coverage

blib/lib/Lab/Moose/Sweep/DataFile.pm
Criterion Covered Total %
statement 6 9 66.6
branch n/a
condition n/a
subroutine 2 3 66.6
pod 0 1 0.0
total 8 13 61.5


line stmt bran cond sub pod time code
1             package Lab::Moose::Sweep::DataFile;
2             $Lab::Moose::Sweep::DataFile::VERSION = '3.881';
3             # ABSTRACT: Store parameters of datafile and its plots.
4 4     4   32 use Moose;
  4         12  
  4         27  
5 4     4   26602 use MooseX::Params::Validate 'validated_hash';
  4         10  
  4         30  
6              
7             has params => ( is => 'ro', isa => 'HashRef', required => 1 );
8              
9             has plots => (
10             is => 'ro', isa => 'ArrayRef[HashRef]',
11             default => sub { [] },
12             );
13              
14             sub add_plot {
15 0     0 0   my ( $self, %args )
16             = validated_hash( \@_, MX_PARAMS_VALIDATE_ALLOW_EXTRA => 1 );
17 0           push @{ $self->plots }, \%args;
  0            
18             }
19              
20             __PACKAGE__->meta->make_immutable();
21             1;
22              
23             __END__
24              
25             =pod
26              
27             =encoding UTF-8
28              
29             =head1 NAME
30              
31             Lab::Moose::Sweep::DataFile - Store parameters of datafile and its plots.
32              
33             =head1 VERSION
34              
35             version 3.881
36              
37             =head1 COPYRIGHT AND LICENSE
38              
39             This software is copyright (c) 2023 by the Lab::Measurement team; in detail:
40              
41             Copyright 2017 Simon Reinhardt
42              
43              
44             This is free software; you can redistribute it and/or modify it under
45             the same terms as the Perl 5 programming language system itself.
46              
47             =cut