GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  WWWDB::LIST (3)

.ds Aq ’

NAME

WWWdb::List - Lists for WWWdb

CONTENTS

SYNOPSIS



 use WWWdb::List;

 $oList     = List->new([FillAtInsert => $bFill]);

 $cResult   = $oList->Append($cValue);

 $cResult   = $oList->Get($iIndex);

 $cResult   = $oList->Set($iIndex, $cValue);

 $cResult   = $oList->Insert($iIndex, $cValue);

 $cResult   = $oList->Delete($iIndex);

 $iResult   = $oList->Count();



DESCRIPTION

The List class

Perl is a good language for list-manipulation. Neverthless I wished some funktionality for imbedded class-elements in list-form. That was the main reason, for developing this class.

    Note

none

    Class Methods

<B>newB>


 $oList     = List->new([FillAtInsert => $bFill]);



Create a new empty list. If the insertion of an element with an index greater then the actual number of elements should be done, you have to decide, if the elements between have to be created, or not. This can be done with the FillAtInsert-argument. True means, that elements with the value undef will be inserted. Otherwise the new element will be appended to the list.

<B>AppendB>


 $cResult   = $oList->Append($cValue);



Appends the value cValue at the end of the list. The appended value will be returned.

<B>GetB>


 $bResult   = $oList->Get($iIndex);



Returns the element with the Index iIndex. Negative numbers take elements from the end of the list, like in Perl.

<B>SetB>


 $cResult   = $oList->Set($iIndex, $cValue);



Sets the value of the element with the Index iIndex. Negative numbers will use elements from the end of the list, like in Perl. The value, that has been set will be returned.

See also the attribute FillAtInsert.

<B>InsertB>


 $cResult   = $oList->Insert($iIndex, $cValue);



Works like <B>SetB>, but inserts the value into the list. This means, that all values with a greater index will be shifted.

See also the attribute FillAtInsert.

<B>DeleteB>


 $cResult   = $oList->Delete($iIndex);



Deletes the element at Index iIndex. The deleted element will be returned.

<B>CountB>


 $iResult   = $oList->Count();



Returns the number of elements, the list contains.

    Class Attributes

<B>NameB>


 $bFill = $oList->getFillAtInsert();
 $oList->setFillAtInsert($bFill);



If empty space should be filled at the insertion of elements, then this attribute should be set.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 WWWDB::LIST (3) 2002-03-14

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.