File Coverage

blib/lib/Tangence/Meta/Field.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 2 2 100.0
total 19 19 100.0


line stmt bran cond sub pod time code
1             # You may distribute under the terms of either the GNU General Public License
2             # or the Artistic License (the same terms as Perl itself)
3             #
4             # (C) Paul Evans, 2012-2024 -- leonerd@leonerd.org.uk
5              
6 15     15   201 use v5.26;
  15         62  
7 15     15   87 use warnings;
  15         30  
  15         1031  
8 15     15   100 use Object::Pad 0.800;
  15         132  
  15         704  
9              
10             package Tangence::Meta::Field 0.33;
11             class Tangence::Meta::Field :strict(params);
12              
13             =head1 NAME
14              
15             C - structure representing one C structure
16             field
17              
18             =head1 DESCRIPTION
19              
20             This data structure object stores information about one field of a L
21             structure. Once constructed, such objects are immutable.
22              
23             =cut
24              
25             =head1 CONSTRUCTOR
26              
27             =cut
28              
29             =head2 new
30              
31             $field = Tangence::Meta::Field->new( %args )
32              
33             Returns a new instance initialised by the given fields.
34              
35             =over 8
36              
37             =item name => STRING
38              
39             Name of the field
40              
41             =item type => STRING
42              
43             Type of the field as a L reference
44              
45             =back
46              
47             =cut
48              
49 1035     1035 1 3047 field $name :param :reader;
  1035         2980  
50 843     843 1 1597 field $type :param :reader;
  843         4195  
51              
52             =head1 ACCESSORS
53              
54             =cut
55              
56             =head2 name
57              
58             $name = $field->name
59              
60             Returns the name of the field
61              
62             =cut
63              
64             =head2 type
65              
66             $type = $field->type
67              
68             Return the type as a L reference.
69              
70             =cut
71              
72             =head1 AUTHOR
73              
74             Paul Evans
75              
76             =cut
77              
78             0x55AA;