line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=head1 NAME |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
Class::MakeMethods::Standard - Make common object accessors |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 SYNOPSIS |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package MyObject; |
9
|
|
|
|
|
|
|
use Class::MakeMethods::Standard::Hash ( |
10
|
|
|
|
|
|
|
new => 'new', |
11
|
|
|
|
|
|
|
scalar => [ 'foo', 'bar' ], |
12
|
|
|
|
|
|
|
array => 'my_list', |
13
|
|
|
|
|
|
|
hash => 'my_index', |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 DESCRIPTION |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
This document describes the various subclasses of Class::MakeMethods |
20
|
|
|
|
|
|
|
included under the Standard::* namespace, and the method types each |
21
|
|
|
|
|
|
|
one provides. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
The Standard subclasses provide a parameterized set of method-generation |
24
|
|
|
|
|
|
|
implementations. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Subroutines are generated as closures bound to a hash containing |
27
|
|
|
|
|
|
|
the method name and (optionally) additional parameters. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 USAGE AND SYNTAX |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
When you C |
33
|
|
|
|
|
|
|
you provide as arguments cause subroutines to be generated and |
34
|
|
|
|
|
|
|
installed in your module. You can also omit the arguments to C |
35
|
|
|
|
|
|
|
and instead make methods at runtime by passing the declarations to |
36
|
|
|
|
|
|
|
a subsequent call to C. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
You may include any number of declarations in each call to C |
39
|
|
|
|
|
|
|
or C. If methods with the same name already exist, earlier |
40
|
|
|
|
|
|
|
calls to C |
41
|
|
|
|
|
|
|
call, later declarations superceed earlier ones. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
You can install methods in a different package by passing |
44
|
|
|
|
|
|
|
C<-target_class =E I> as your first arguments to C |
45
|
|
|
|
|
|
|
or C. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
See L for more details. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
package Class::MakeMethods::Standard; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
$VERSION = 1.000; |
54
|
11
|
|
|
11
|
|
60
|
use strict; |
|
11
|
|
|
|
|
22
|
|
|
11
|
|
|
|
|
496
|
|
55
|
11
|
|
|
11
|
|
4590
|
use Class::MakeMethods '-isasubclass'; |
|
11
|
|
|
|
|
22
|
|
|
11
|
|
|
|
|
73
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
######################################################################## |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 SEE ALSO |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
See L for general information about this distribution. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
For distribution, installation, support, copyright and license |
64
|
|
|
|
|
|
|
information, see L. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |