The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DataStructure::DoubleList::Node

SYNOPSIS

A single node (element) in a DataStructure::DoubleList.

DESCRIPTION

CONSTRUCTOR

You can’t build a node directly. Instead you can call one of the accessors of a DataStructure::DoubleList or some of the methods below.

Note that a DataStructure::DoubleList::Node does not hold a reference on its parent list. So a node becomes invalid when the last reference to its list is deleted as the list itself will be destroyed. But you should also not depend on this behavior as it might be fixed in the future.

METHODS

All the functions below are class methods that should be called on a DataStructure::DoubleList::Node object.

value()

Returns the value held by this node.

prev()

Returns the previous DataStructure::DoubleList::Node in this list or undef if the current object is the first node in its list.

The current node can still be used after that call.

next()

Returns the next DataStructure::DoubleList::Node in this list or undef if the current object is the last node in its list.

The current node can still be used after that call.

insert_after($value)

Inserts a new node in the list after the current one, with the given value and returns that new node.

The current node can still be used after that call.

insert_before($value)

Inserts a new node before in the list before the current one, with the given value and returns that new node.

The current node can still be used after that call.

delete()

Removes the node from the list and returns the value that it help value. The node becomes invalid and can no longer be used.

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 28:

Non-ASCII character seen before =encoding in 'can’t'. Assuming UTF-8

Around line 58:

=over without closing =back

Around line 155:

=over is the last thing in the document?!