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 11 Sun::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 19 This module is used for manipulating C<libexacct(3LIB)> data Items. A 20 libexacct Item is represented as an opaque reference blessed into the 21 C<Sun::Solaris::Exacct::Object::Item> class, which is a subclass of the 22 C<Sun::Solaris::Exacct::Object> class. The underlying libexacct data types are 23 mapped onto Perl types as follows: 24 25 B<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 45 None. 46 47 =head2 Functions 48 49 None. 50 51 =head2 Class methods 52 53 Class methods include those inherited from the C<Sun::Solaris::Exacct::Object> 54 base class, plus the following: 55 56 B<C<new($catalog, $value)>> 57 58 This method creates and returns a new C<Sun::Solaris::Exacct::Object::Item>. 59 The catalog tag can be either an integer or a 60 C<Sun::Solaris::Exacct::Catalog>. This catalog tag controls the conversion of 61 the Perl value to the corresponding Perl exacct data type as described in the 62 table above. If the catalog tag has a type field of C<EXT_EXACCT_OBJECT>, the 63 value must be a reference to either an Item or a Group object and the passed 64 object is recursively copied and stored inside the new Item. Because the 65 returned Item is constant, it is impossible, for example, to create an Item 66 representing CPU seconds and subsequently modify its value or change its 67 catalog value. This behavior is intended to prevent mismatches between the 68 catalog tag and the data value. 69 70 =head2 Object methods 71 72 Object methods are those inherited from the C<Sun::Solaris::Exacct::Object>. 73 74 =head2 Exports 75 76 None. 77 78 =head1 ATTRIBUTES 79 80 See 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 92 C<Sun::Solaris::Exacct(3)>, C<Sun::Solaris::Exacct::Catalog(3)>, 93 C<Sun::Solaris::Exacct::File(3)>, C<Sun::Solaris::Exacct::Object(3)>, 94 C<Sun::Solaris::Exacct::Object::Group(3)>, C<libexacct(3LIB)>, C<attributes(5)>