| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Mars::Kind::Class; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 5 |  |  | 5 |  | 2160 | use 5.018; | 
|  | 5 |  |  |  |  | 12 |  | 
| 4 |  |  |  |  |  |  |  | 
| 5 | 5 |  |  | 5 |  | 20 | use strict; | 
|  | 5 |  |  |  |  | 8 |  | 
|  | 5 |  |  |  |  | 78 |  | 
| 6 | 5 |  |  | 5 |  | 16 | use warnings; | 
|  | 5 |  |  |  |  | 8 |  | 
|  | 5 |  |  |  |  | 108 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 | 5 |  |  | 5 |  | 21 | use base 'Mars::Kind'; | 
|  | 5 |  |  |  |  | 8 |  | 
|  | 5 |  |  |  |  | 1880 |  | 
| 9 |  |  |  |  |  |  |  | 
| 10 |  |  |  |  |  |  | # METHODS | 
| 11 |  |  |  |  |  |  |  | 
| 12 |  |  |  |  |  |  | sub does { | 
| 13 | 19 |  |  | 19 | 1 | 1860 | my ($self, @args) = @_; | 
| 14 |  |  |  |  |  |  |  | 
| 15 | 19 |  |  |  |  | 55 | return $self->DOES(@args); | 
| 16 |  |  |  |  |  |  | } | 
| 17 |  |  |  |  |  |  |  | 
| 18 |  |  |  |  |  |  | sub meta { | 
| 19 | 16 |  |  | 16 | 1 | 58 | my ($self) = @_; | 
| 20 |  |  |  |  |  |  |  | 
| 21 | 16 |  |  |  |  | 63 | return $self->META; | 
| 22 |  |  |  |  |  |  | } | 
| 23 |  |  |  |  |  |  |  | 
| 24 |  |  |  |  |  |  | sub new { | 
| 25 | 33 |  |  | 33 | 1 | 32604 | my ($self, @args) = @_; | 
| 26 |  |  |  |  |  |  |  | 
| 27 | 33 |  |  |  |  | 113 | return $self->BLESS(@args); | 
| 28 |  |  |  |  |  |  | } | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | 1; | 
| 31 |  |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  |  | 
| 34 |  |  |  |  |  |  | =head1 NAME | 
| 35 |  |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  | Mars::Kind::Class - Class Base Class | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | =cut | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | =head1 ABSTRACT | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | Class Base Class for Perl 5 | 
| 43 |  |  |  |  |  |  |  | 
| 44 |  |  |  |  |  |  | =cut | 
| 45 |  |  |  |  |  |  |  | 
| 46 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 47 |  |  |  |  |  |  |  | 
| 48 |  |  |  |  |  |  | package User; | 
| 49 |  |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  | use base 'Mars::Kind::Class'; | 
| 51 |  |  |  |  |  |  |  | 
| 52 |  |  |  |  |  |  | package main; | 
| 53 |  |  |  |  |  |  |  | 
| 54 |  |  |  |  |  |  | my $user = User->new( | 
| 55 |  |  |  |  |  |  | fname => 'Elliot', | 
| 56 |  |  |  |  |  |  | lname => 'Alderson', | 
| 57 |  |  |  |  |  |  | ); | 
| 58 |  |  |  |  |  |  |  | 
| 59 |  |  |  |  |  |  | # bless({fname => 'Elliot', lname => 'Alderson'}, 'User') | 
| 60 |  |  |  |  |  |  |  | 
| 61 |  |  |  |  |  |  | =cut | 
| 62 |  |  |  |  |  |  |  | 
| 63 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 64 |  |  |  |  |  |  |  | 
| 65 |  |  |  |  |  |  | This package provides a class base class with class building and object | 
| 66 |  |  |  |  |  |  | construction lifecycle hooks. | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  | =cut | 
| 69 |  |  |  |  |  |  |  | 
| 70 |  |  |  |  |  |  | =head1 INHERITS | 
| 71 |  |  |  |  |  |  |  | 
| 72 |  |  |  |  |  |  | This package inherits behaviors from: | 
| 73 |  |  |  |  |  |  |  | 
| 74 |  |  |  |  |  |  | L | 
| 75 |  |  |  |  |  |  |  | 
| 76 |  |  |  |  |  |  | =cut | 
| 77 |  |  |  |  |  |  |  | 
| 78 |  |  |  |  |  |  | =head1 METHODS | 
| 79 |  |  |  |  |  |  |  | 
| 80 |  |  |  |  |  |  | This package provides the following methods: | 
| 81 |  |  |  |  |  |  |  | 
| 82 |  |  |  |  |  |  | =cut | 
| 83 |  |  |  |  |  |  |  | 
| 84 |  |  |  |  |  |  | =head2 does | 
| 85 |  |  |  |  |  |  |  | 
| 86 |  |  |  |  |  |  | does(Str $name) (Bool) | 
| 87 |  |  |  |  |  |  |  | 
| 88 |  |  |  |  |  |  | The does method returns true if the object is composed of the role provided. | 
| 89 |  |  |  |  |  |  |  | 
| 90 |  |  |  |  |  |  | I> | 
| 91 |  |  |  |  |  |  |  | 
| 92 |  |  |  |  |  |  | =over 4 | 
| 93 |  |  |  |  |  |  |  | 
| 94 |  |  |  |  |  |  | =item does example 1 | 
| 95 |  |  |  |  |  |  |  | 
| 96 |  |  |  |  |  |  | # given: synopsis | 
| 97 |  |  |  |  |  |  |  | 
| 98 |  |  |  |  |  |  | my $does = $user->does('Identity'); | 
| 99 |  |  |  |  |  |  |  | 
| 100 |  |  |  |  |  |  | # 0 | 
| 101 |  |  |  |  |  |  |  | 
| 102 |  |  |  |  |  |  | =back | 
| 103 |  |  |  |  |  |  |  | 
| 104 |  |  |  |  |  |  | =cut | 
| 105 |  |  |  |  |  |  |  | 
| 106 |  |  |  |  |  |  | =head2 meta | 
| 107 |  |  |  |  |  |  |  | 
| 108 |  |  |  |  |  |  | meta() (Meta) | 
| 109 |  |  |  |  |  |  |  | 
| 110 |  |  |  |  |  |  | The meta method returns a L objects which describes the package's | 
| 111 |  |  |  |  |  |  | configuration. | 
| 112 |  |  |  |  |  |  |  | 
| 113 |  |  |  |  |  |  | I> | 
| 114 |  |  |  |  |  |  |  | 
| 115 |  |  |  |  |  |  | =over 4 | 
| 116 |  |  |  |  |  |  |  | 
| 117 |  |  |  |  |  |  | =item meta example 1 | 
| 118 |  |  |  |  |  |  |  | 
| 119 |  |  |  |  |  |  | # given: synopsis | 
| 120 |  |  |  |  |  |  |  | 
| 121 |  |  |  |  |  |  | package main; | 
| 122 |  |  |  |  |  |  |  | 
| 123 |  |  |  |  |  |  | my $user = User->new( | 
| 124 |  |  |  |  |  |  | fname => 'Elliot', | 
| 125 |  |  |  |  |  |  | lname => 'Alderson', | 
| 126 |  |  |  |  |  |  | ); | 
| 127 |  |  |  |  |  |  |  | 
| 128 |  |  |  |  |  |  | my $meta = $user->meta; | 
| 129 |  |  |  |  |  |  |  | 
| 130 |  |  |  |  |  |  | # bless({...}, 'Mars::Meta') | 
| 131 |  |  |  |  |  |  |  | 
| 132 |  |  |  |  |  |  | =back | 
| 133 |  |  |  |  |  |  |  | 
| 134 |  |  |  |  |  |  | =cut | 
| 135 |  |  |  |  |  |  |  | 
| 136 |  |  |  |  |  |  | =head2 new | 
| 137 |  |  |  |  |  |  |  | 
| 138 |  |  |  |  |  |  | new(Any %args | HashRef $args) (Object) | 
| 139 |  |  |  |  |  |  |  | 
| 140 |  |  |  |  |  |  | The new method instantiates the class and returns a new object. | 
| 141 |  |  |  |  |  |  |  | 
| 142 |  |  |  |  |  |  | I> | 
| 143 |  |  |  |  |  |  |  | 
| 144 |  |  |  |  |  |  | =over 4 | 
| 145 |  |  |  |  |  |  |  | 
| 146 |  |  |  |  |  |  | =item new example 1 | 
| 147 |  |  |  |  |  |  |  | 
| 148 |  |  |  |  |  |  | package main; | 
| 149 |  |  |  |  |  |  |  | 
| 150 |  |  |  |  |  |  | my $user = User->new( | 
| 151 |  |  |  |  |  |  | fname => 'Elliot', | 
| 152 |  |  |  |  |  |  | lname => 'Alderson', | 
| 153 |  |  |  |  |  |  | ); | 
| 154 |  |  |  |  |  |  |  | 
| 155 |  |  |  |  |  |  | # bless({fname => 'Elliot', lname => 'Alderson'}, 'User') | 
| 156 |  |  |  |  |  |  |  | 
| 157 |  |  |  |  |  |  | =back | 
| 158 |  |  |  |  |  |  |  | 
| 159 |  |  |  |  |  |  | =over 4 | 
| 160 |  |  |  |  |  |  |  | 
| 161 |  |  |  |  |  |  | =item new example 2 | 
| 162 |  |  |  |  |  |  |  | 
| 163 |  |  |  |  |  |  | package main; | 
| 164 |  |  |  |  |  |  |  | 
| 165 |  |  |  |  |  |  | my $user = User->new({ | 
| 166 |  |  |  |  |  |  | fname => 'Elliot', | 
| 167 |  |  |  |  |  |  | lname => 'Alderson', | 
| 168 |  |  |  |  |  |  | }); | 
| 169 |  |  |  |  |  |  |  | 
| 170 |  |  |  |  |  |  | # bless({fname => 'Elliot', lname => 'Alderson'}, 'User') | 
| 171 |  |  |  |  |  |  |  | 
| 172 |  |  |  |  |  |  | =back | 
| 173 |  |  |  |  |  |  |  | 
| 174 |  |  |  |  |  |  | =cut | 
| 175 |  |  |  |  |  |  |  | 
| 176 |  |  |  |  |  |  | =head1 AUTHORS | 
| 177 |  |  |  |  |  |  |  | 
| 178 |  |  |  |  |  |  | Awncorp, C | 
| 179 |  |  |  |  |  |  |  | 
| 180 |  |  |  |  |  |  | =cut |