Perlbug::Object::Range - Range class


Perlbug documentation  | view source Contained in the Perlbug distribution.

Index


NAME

Top

Perlbug::Object::Range - Range class

DESCRIPTION

Top

Perlbug Range class.

For inherited methods, see Perlbug::Object

SYNOPSIS

Top

	use Perlbug::Object::Range;

	my $o_rng = Perlbug::Object::Range->new();

	print $o_rng->read('123');




METHODS

Top

new

Create new Range object:

	my $o_rng = Perlbug::Object::Range->new();

rangeify

Return a string representing the shortened (ranged) version of the given list

	my $str = $o_rng->rangeify(\@list); # qw(1 3 4 6 123) -> '1,3-6,123'

derangeify

Return a list from the shortened (ranged) string from the db

	my @list = $o_rng->derangeify($string); # '1,3-6,123' -> [(1 3 4 6 123)]

AUTHOR

Top

Richard Foley perlbug@rfi.net 2001


Perlbug documentation  | view source Contained in the Perlbug distribution.