1#
2# Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
3#
4
5#
6# Sun::Solaris::Exacct::Object::Group documentation.
7#
8
9=head1 NAME
10
11Sun::Solaris::Exacct::Object::Group - exacct group manipulation
12
13=head1 SYNOPSIS
14
15 use Sun::Solaris::Exacct::Object;
16 my $ea_grp = Sun::Solaris::Exacct::Object::Group->new(
17     &EXT_GROUP | &EXC_DEFAULT | &EXD_GROUP_PROC);
18
19This module is used for manipulating C<libexacct(3LIB)> Group objects. A
20libexacct Group object is represented as an opaque reference blessed into the
21C<Sun::Solaris::Exacct::Object::Group> class, which is a subclass of the
22C<Sun::Solaris::Exacct::Object> class. The Items within a Group are stored
23inside a Perl array. A reference to the array can be accessed with the
24inherited value() method. The individual Items within a Group can be
25manipulated with the normal Perl array syntax and operators. All data elements
26of the array must be derived from the C<Sun::Solaris::Exacct::Object> class.
27Group objects can also be nested inside each other simply by adding an
28existing Group as a data Item.
29
30=head2 Constants
31
32None.
33
34=head2 Functions
35
36None.
37
38=head2 Class methods
39
40Class methods include those inherited from the C<Sun::Solaris::Exacct::Object>
41base class, plus the following:
42
43B<C<new($catalog, @objects)>>
44
45This method creates and returns a new C<Sun::Solaris::Exacct::Object::Group>.
46The catalog tag can be either an integer or a
47C<Sun::Solaris::Exacct::Catalog>. The catalog tag should be a valid catalog
48tag for a Perl exacct Group object. The C<@objects> parameter is a list of
49C<Sun::Solaris::Exacct::Object> to be stored inside the Group. A copy of all
50the passed Items is taken and any Group objects are recursively copied. The
51contents of the returned Group object can be accessed with the array returned
52by the C<value()> method.
53
54=head2 Object methods
55
56B<C<as_hash()>>
57
58This method returns the contents of the group as a hash reference. It uses the
59string value of each item's catalog ID as the hash entry key and the scalar
60value returned by C<value()> as the hash entry value.
61
62This form should be used if there are no duplicate catalog tags in the group.
63
64This method and its companion C<as_hashlist()> are the fastest ways to access
65the contents of a Group.
66
67B<C<as_hashlist()>>
68
69This method returns the contents of the group as a hash reference. It uses the
70string value of each item's catalog id as the hash entry key and an array of
71the scalar values returned by C<value()> as the hash entry value for all the
72items that share a common key. This form should be used if there might be
73duplicate catalog tags in the group.
74
75This method and its companion C<as_hash()> are the fastest ways to access the
76contents of a Group.
77
78=head2 Exports
79
80None.
81
82=head1 ATTRIBUTES
83
84See C<attributes(5)> for descriptions of the following attributes:
85
86  ___________________________________________________________
87 |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
88 |_____________________________|_____________________________|
89 | Availability                | CPAN (http://www.cpan.org)  |
90 |_____________________________|_____________________________|
91 | Interface Stability         | Evolving                    |
92 |_____________________________|_____________________________|
93
94=head1 SEE ALSO
95
96C<Sun::Solaris::Exacct(3)>, C<Sun::Solaris::Exacct::Catalog(3)>,
97C<Sun::Solaris::Exacct::File(3)>, C<Sun::Solaris::Exacct::Object(3)>,
98C<Sun::Solaris::Exacct::Object::Item(3)>, C<libexacct(3LIB)>, C<attributes(5)>
99