String::TieStack

Base class for Rexx-type stacks
Download

String::TieStack Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Ioannis Tambouras
  • Publisher web site:
  • http://search.cpan.org/~ioannis/

String::TieStack Tags


String::TieStack Description

Base class for Rexx-type stacks String::TieStack is a Perl module that implements a base class for Rexx-type stacks.By default, stacks have no entry or size limits; although, defaults can be changed at "use" time (as shown above), or they can be explicitly set by methods after the stack is instantiated.SYNOPSIS # Set default to no stack limits use String::TieStack ; # Set default so stacks are limited to 400 entries use String::TieStack max_entries => 400 ; # Set default so stacks are limited to 2*1024 bytes use String::TieStack max_KBytes => 2 ; $t = tie my @arr , 'String::TieStack'; push @arr , qw( one two ) ; unshift @arr , qw( -one zero ) ; pop @arr ; $t->queue ( qw( -two -three) ; # Same like $t->UNSHIFT( reverse @_ ) $t->pull(3) ; # Returns the N topmost elements $t->pullall ; # Pop() all entries in one step. $t->CLEAR ; # Clears the stack. Same as @arr = () ; $t->qelem ; # Return the number of entries in the stack $t->queued ; # Alias for qelem() $t->makebuf ; # Create a new buffer $t->qbuf ; # Return the number of buffer in the stack $t->dropbuf ; # Remove the topmost buffer $t->desbuf ; # Remove all buffers pullbuf $t->max_entries; # get/set the value of max_entries $t->max_KBytes ; # get/set the value of max_KBytes limits $t->printq ; # Print all entries dumpq pdumpq Requirements: · Perl


String::TieStack Related Software