1 '\" te 2 .\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved. 3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. 4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. 5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] 6 .TH EXACCT::OBJECT::GROUP 3PERL "Dec 1, 2002" 7 .SH NAME 8 Exacct::Object::Group \- exacct group manipulation 9 .SH SYNOPSIS 10 .LP 11 .nf 12 use Sun::Solaris::Exacct::Object; 13 my $ea_grp = Sun::Solaris::Exacct::Object::Group->new( 14 & EXT_GROUP | &EXC_DEFAULT | &EXD_GROUP_PROC); 15 .fi 16 17 .SH DESCRIPTION 18 .sp 19 .LP 20 This module is used for manipulating \fBlibexacct\fR(3LIB) Group objects. A 21 \fBlibexacct\fR Group object is represented as an opaque reference blessed into 22 the \fBSun::Solaris::Exacct::Object::Group\fR class, which is a subclass of the 23 \fBSun::Solaris::Exacct::Object\fR class. The Items within a Group are stored 24 inside a Perl array. A reference to the array can be accessed with the 25 inherited \fBvalue()\fR method. The individual Items within a Group can be 26 manipulated with the normal Perl array syntax and operators. All data elements 27 of the array must be derived from the \fBSun::Solaris::Exacct::Object\fR class. 28 Group objects can also be nested inside each other simply by adding an existing 29 Group as a data Item. 30 .SS "Constants" 31 .sp 32 .LP 33 None. 34 .SS "Functions" 35 .sp 36 .LP 37 None. 38 .SS "Class methods" 39 .sp 40 .LP 41 Class methods include those inherited from the 42 \fBSun::Solaris::Exacct::Object\fR base class, plus the following: 43 .sp 44 .ne 2 45 .na 46 \fB\fBnew($catalog, @objects)\fR\fR 47 .ad 48 .RS 27n 49 This method creates and returns a new 50 \fBSun::Solaris::Exacct::Object::Group\fR. The catalog tag can be either an 51 integer or a \fBSun::Solaris::Exacct::Catalog\fR. The catalog tag should be a 52 valid catalog tag for a Perl exacct Group object. The \fB@objects\fR parameter 53 is a list of \fBSun::Solaris::Exacct::Object\fR to be stored inside the Group. 54 A copy of all the passed Items is taken and any Group objects are recursively 55 copied. The contents of the returned Group object can be accessed with the 56 array returned by the value method. 57 .RE 58 59 .SS "Object methods" 60 .sp 61 .ne 2 62 .na 63 \fB\fBas_hash()\fR\fR 64 .ad 65 .RS 17n 66 This method returns the contents of the group as a hash reference. It uses the 67 string value of each item's catalog ID as the hash entry key and the scalar 68 value returned by \fBvalue()\fR as the hash entry value. This form should be 69 used if there are no duplicate catalog tags in the group. 70 .sp 71 This method and its companion \fBas_hashlist()\fR are the fastest ways to 72 access the contents of a Group. 73 .RE 74 75 .sp 76 .ne 2 77 .na 78 \fB\fBas_hashlist()\fR\fR 79 .ad 80 .RS 17n 81 This method returns the contents of the group as a hash reference. It uses the 82 string value of each item's catalog id as the hash entry key and an array of 83 the scalar values returned by \fBvalue()\fR as the hash entry value for all the 84 items that share a common key. This form should be used if there might be 85 duplicate catalog tags in the group. 86 .sp 87 This method and its companion \fBas_hash()\fR are the fastest ways to access 88 the contents of a Group. 89 .RE 90 91 .SS "Exports" 92 .sp 93 .LP 94 None. 95 .SH ATTRIBUTES 96 .sp 97 .LP 98 See \fBattributes\fR(5) for descriptions of the following attributes: 99 .sp 100 101 .sp 102 .TS 103 box; 104 c | c 105 l | l . 106 ATTRIBUTE TYPE ATTRIBUTE VALUE 107 _ 108 Interface Stability Evolving 109 .TE 110 111 .SH SEE ALSO 112 .sp 113 .LP 114 \fBExacct\fR(3PERL), \fBExacct::Catalog\fR(3PERL), \fBExacct::File\fR(3PERL), 115 \fBExacct::Object\fR(3PERL), \fBExacct::Object::Item\fR(3PERL), 116 \fBlibexacct\fR(3LIB), \fBattributes\fR(5)