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
XML::Pastor::Stack(3) User Contributed Perl Documentation XML::Pastor::Stack(3)

XML::Pastor::Stack - A Stack!

This module is used internally by XML::Pastor. You do not normally know much about this module to actually use XML::Pastor. It is documented here for completeness and for XML::Pastor developers. Do not count on the interface of this module. It may change in any of the subsequent releases. You have been warned.

  use XML::Pastor::Stack;
  my $stack = new XML::Pastor::Stack();

Quite simple, really. Just a stack implemented via an array.

This module is a blunt copy of the Data::Stack module. I had originally intended to use that module but it turns out that it -superflously- requires perl 5.8.6 to build and I only had perl 5.8.4 on my system with no means to upgrade. So that's why I had to copy all the code in Data::Stack into this otherwise needless module.

new( [ @ITEMS ] )
Creates a new XML::Pastor::Stack. If passed an array, those items are added to the stack.
peek()
Returns the item at the top of the stack but does not remove it.
get($INDEX)
Returns the item at position $INDEX in the stack but does not remove it. 0 based.
count()
Returns the number of items in the stack.
empty()
Returns a true value if the stack is empty. Returns a false value if not.
clear()
Completely clear the stack.
pop()
Removes the item at the top of the stack and returns it.
push($item)
Adds the item to the top of the stack.

None by default.

There are various Stack packages out there but none of them seemed simple enough. Here we are!

Ayhan Ulusoy <dev(at)ulusoy(dot)name>

The author of the original module Data::Stack is: Cory Watson, <cpan@onemogin.com>

  Copyright (C) 2006-2007 by Ayhan Ulusoy. (A shame, as the code is copied from Data::Stack by Cory Watson)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2008-08-02 perl v5.32.1

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

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