xref: /onnv-gate/usr/src/cmd/perl/contrib/Sun/Solaris/Exacct/pod/Item.pod (revision 12388:1bc8d55b0dfd)
1#
2# Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
3#
4
5#
6# Sun::Solaris::Exacct::Object::Item documentation.
7#
8
9=head1 NAME
10
11Sun::Solaris::Exacct::Object::Item - exacct item manipulation
12
13=head1 SYNOPSIS
14
15 use Sun::Solaris::Exacct::Object;
16 my $ea_item = Sun::Solaris::Exacct::Object::Item->new(
17     &EXT_UINT64 | &EXC_DEFAULT | &EXD_PROC_PID, $$);
18
19This module is used for manipulating C<libexacct(3LIB)> data Items. A
20libexacct Item is represented as an opaque reference blessed into the
21C<Sun::Solaris::Exacct::Object::Item> class, which is a subclass of the
22C<Sun::Solaris::Exacct::Object> class. The underlying libexacct data types are
23mapped onto Perl types as follows:
24
25B<C< libexacct type                Perl internal type>>
26
27 EXT_UINT8                     IV (integer)
28
29 EXT_UINT16                    IV (integer)
30
31 EXT_UINT32                    IV (integer)
32
33 EXT_UINT64                    IV (integer)
34
35 EXT_DOUBLE                    NV (double)
36
37 EXT_STRING                    PV (string)
38
39 EXT_RAW                       PV (string)
40
41 EXT_EXACCT_OBJECT             Sun::Solaris::Exacct::Object subclass
42
43=head2 Constants
44
45None.
46
47=head2 Functions
48
49None.
50
51=head2 Class methods
52
53Class methods include those inherited from the C<Sun::Solaris::Exacct::Object>
54base class, plus the following:
55
56B<C<new($catalog, $value)>>
57
58This method creates and returns a new C<Sun::Solaris::Exacct::Object::Item>.
59The catalog tag can be either an integer or a
60C<Sun::Solaris::Exacct::Catalog>. This catalog tag controls the conversion of
61the Perl value to the corresponding Perl exacct data type as described in the
62table above. If the catalog tag has a type field of C<EXT_EXACCT_OBJECT>, the
63value must be a reference to either an Item or a Group object and the passed
64object is recursively copied and stored inside the new Item. Because the
65returned Item is constant, it is impossible, for example, to create an Item
66representing CPU seconds and subsequently modify its value or change its
67catalog value. This behavior is intended to prevent mismatches between the
68catalog tag and the data value.
69
70=head2 Object methods
71
72Object methods are those inherited from the C<Sun::Solaris::Exacct::Object>.
73
74=head2 Exports
75
76None.
77
78=head1 ATTRIBUTES
79
80See C<attributes(5)> for descriptions of the following attributes:
81
82  ___________________________________________________________
83 |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
84 |_____________________________|_____________________________|
85 | Availability                | CPAN (http://www.cpan.org)  |
86 |_____________________________|_____________________________|
87 | Interface Stability         | Evolving                    |
88 |_____________________________|_____________________________|
89
90=head1 SEE ALSO
91
92C<Sun::Solaris::Exacct(3)>, C<Sun::Solaris::Exacct::Catalog(3)>,
93C<Sun::Solaris::Exacct::File(3)>, C<Sun::Solaris::Exacct::Object(3)>,
94C<Sun::Solaris::Exacct::Object::Group(3)>, C<libexacct(3LIB)>, C<attributes(5)>
95