File Coverage

blib/lib/Tangence/Meta/Argument.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, 2011-2024 -- leonerd@leonerd.org.uk
5              
6 15     15   237 use v5.26;
  15         172  
7 15     15   99 use warnings;
  15         28  
  15         1040  
8 15     15   90 use Object::Pad 0.800;
  15         111  
  15         700  
9              
10             package Tangence::Meta::Argument 0.33;
11             class Tangence::Meta::Argument :strict(params);
12              
13             =head1 NAME
14              
15             C - structure representing one C method or event argument
16              
17             =head1 DESCRIPTION
18              
19             This data structure object stores information about one argument to a
20             L class method or event. Once constructed, such objects are
21             immutable.
22              
23             =cut
24              
25             =head1 CONSTRUCTOR
26              
27             =cut
28              
29             =head2 new
30              
31             $argument = Tangence::Meta::Argument->new( %args )
32              
33             Returns a new instance initialised by the given arguments.
34              
35             =over 8
36              
37             =item name => STRING
38              
39             Name of the argument
40              
41             =item type => STRING
42              
43             Type of the arugment as a L reference
44              
45             =back
46              
47             =cut
48              
49             field $name :reader :param = undef;
50 2     2 1 1008 field $type :reader :param;
  2     101 1 14  
  101         265  
  101         532  
51              
52             =head1 ACCESSORS
53              
54             =cut
55              
56             =head2 name
57              
58             $name = $argument->name
59              
60             Returns the name of the class
61              
62             =cut
63              
64             =head2 type
65              
66             $type = $argument->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;