xref: /onnv-gate/usr/src/cmd/perl/contrib/Sun/Solaris/Exacct/pod/Group.pod (revision 12388:1bc8d55b0dfd)
10Sstevel@tonic-gate#
2*12388SJohn.Sonnenschein@Sun.COM# Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
30Sstevel@tonic-gate#
4*12388SJohn.Sonnenschein@Sun.COM
50Sstevel@tonic-gate#
60Sstevel@tonic-gate# Sun::Solaris::Exacct::Object::Group documentation.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate
90Sstevel@tonic-gate=head1 NAME
100Sstevel@tonic-gate
110Sstevel@tonic-gateSun::Solaris::Exacct::Object::Group - exacct group manipulation
120Sstevel@tonic-gate
130Sstevel@tonic-gate=head1 SYNOPSIS
140Sstevel@tonic-gate
150Sstevel@tonic-gate use Sun::Solaris::Exacct::Object;
160Sstevel@tonic-gate my $ea_grp = Sun::Solaris::Exacct::Object::Group->new(
170Sstevel@tonic-gate     &EXT_GROUP | &EXC_DEFAULT | &EXD_GROUP_PROC);
180Sstevel@tonic-gate
190Sstevel@tonic-gateThis module is used for manipulating C<libexacct(3LIB)> Group objects. A
200Sstevel@tonic-gatelibexacct Group object is represented as an opaque reference blessed into the
210Sstevel@tonic-gateC<Sun::Solaris::Exacct::Object::Group> class, which is a subclass of the
220Sstevel@tonic-gateC<Sun::Solaris::Exacct::Object> class. The Items within a Group are stored
230Sstevel@tonic-gateinside a Perl array. A reference to the array can be accessed with the
240Sstevel@tonic-gateinherited value() method. The individual Items within a Group can be
250Sstevel@tonic-gatemanipulated with the normal Perl array syntax and operators. All data elements
260Sstevel@tonic-gateof the array must be derived from the C<Sun::Solaris::Exacct::Object> class.
270Sstevel@tonic-gateGroup objects can also be nested inside each other simply by adding an
280Sstevel@tonic-gateexisting Group as a data Item.
290Sstevel@tonic-gate
300Sstevel@tonic-gate=head2 Constants
310Sstevel@tonic-gate
320Sstevel@tonic-gateNone.
330Sstevel@tonic-gate
340Sstevel@tonic-gate=head2 Functions
350Sstevel@tonic-gate
360Sstevel@tonic-gateNone.
370Sstevel@tonic-gate
380Sstevel@tonic-gate=head2 Class methods
390Sstevel@tonic-gate
400Sstevel@tonic-gateClass methods include those inherited from the C<Sun::Solaris::Exacct::Object>
410Sstevel@tonic-gatebase class, plus the following:
420Sstevel@tonic-gate
430Sstevel@tonic-gateB<C<new($catalog, @objects)>>
440Sstevel@tonic-gate
450Sstevel@tonic-gateThis method creates and returns a new C<Sun::Solaris::Exacct::Object::Group>.
460Sstevel@tonic-gateThe catalog tag can be either an integer or a
470Sstevel@tonic-gateC<Sun::Solaris::Exacct::Catalog>. The catalog tag should be a valid catalog
480Sstevel@tonic-gatetag for a Perl exacct Group object. The C<@objects> parameter is a list of
490Sstevel@tonic-gateC<Sun::Solaris::Exacct::Object> to be stored inside the Group. A copy of all
500Sstevel@tonic-gatethe passed Items is taken and any Group objects are recursively copied. The
510Sstevel@tonic-gatecontents of the returned Group object can be accessed with the array returned
520Sstevel@tonic-gateby the C<value()> method.
530Sstevel@tonic-gate
540Sstevel@tonic-gate=head2 Object methods
550Sstevel@tonic-gate
560Sstevel@tonic-gateB<C<as_hash()>>
570Sstevel@tonic-gate
580Sstevel@tonic-gateThis method returns the contents of the group as a hash reference. It uses the
590Sstevel@tonic-gatestring value of each item's catalog ID as the hash entry key and the scalar
600Sstevel@tonic-gatevalue returned by C<value()> as the hash entry value.
610Sstevel@tonic-gate
620Sstevel@tonic-gateThis form should be used if there are no duplicate catalog tags in the group.
630Sstevel@tonic-gate
640Sstevel@tonic-gateThis method and its companion C<as_hashlist()> are the fastest ways to access
650Sstevel@tonic-gatethe contents of a Group.
660Sstevel@tonic-gate
670Sstevel@tonic-gateB<C<as_hashlist()>>
680Sstevel@tonic-gate
690Sstevel@tonic-gateThis method returns the contents of the group as a hash reference. It uses the
700Sstevel@tonic-gatestring value of each item's catalog id as the hash entry key and an array of
710Sstevel@tonic-gatethe scalar values returned by C<value()> as the hash entry value for all the
720Sstevel@tonic-gateitems that share a common key. This form should be used if there might be
730Sstevel@tonic-gateduplicate catalog tags in the group.
740Sstevel@tonic-gate
750Sstevel@tonic-gateThis method and its companion C<as_hash()> are the fastest ways to access the
760Sstevel@tonic-gatecontents of a Group.
770Sstevel@tonic-gate
780Sstevel@tonic-gate=head2 Exports
790Sstevel@tonic-gate
800Sstevel@tonic-gateNone.
810Sstevel@tonic-gate
820Sstevel@tonic-gate=head1 ATTRIBUTES
830Sstevel@tonic-gate
840Sstevel@tonic-gateSee C<attributes(5)> for descriptions of the following attributes:
850Sstevel@tonic-gate
860Sstevel@tonic-gate  ___________________________________________________________
870Sstevel@tonic-gate |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
880Sstevel@tonic-gate |_____________________________|_____________________________|
890Sstevel@tonic-gate | Availability                | CPAN (http://www.cpan.org)  |
900Sstevel@tonic-gate |_____________________________|_____________________________|
910Sstevel@tonic-gate | Interface Stability         | Evolving                    |
920Sstevel@tonic-gate |_____________________________|_____________________________|
930Sstevel@tonic-gate
940Sstevel@tonic-gate=head1 SEE ALSO
950Sstevel@tonic-gate
960Sstevel@tonic-gateC<Sun::Solaris::Exacct(3)>, C<Sun::Solaris::Exacct::Catalog(3)>,
970Sstevel@tonic-gateC<Sun::Solaris::Exacct::File(3)>, C<Sun::Solaris::Exacct::Object(3)>,
980Sstevel@tonic-gateC<Sun::Solaris::Exacct::Object::Item(3)>, C<libexacct(3LIB)>, C<attributes(5)>
99