use strict;
our $VERSION = 0.001_000;
#use parent qw(RPerl::DataStructure RPerl::DataType::Modifier::Reference); # NEED UPGRADE: multiple inheritance
use parent qw(RPerl::DataType::Modifier::Reference); # NEED UPGRADE: multiple inheritance
#use RPerl::DataStructure;
# must include here because we do not inherit data types
our hashref $properties =
{
data => my unknown $TYPED_data = undef,
next => my RPerl::DataStructure::LinkedList::NodeReference $TYPED_next = undef
};
our string::method $DUMPER = sub {(my RPerl::DataStructure::LinkedList::NodeReference $node) = @_;
my string $dumped = '[';
my integer $is_first = 1;
while (defined($node))
{
if ($is_first) { $is_first = 0; }
else { $dumped .= ', '; }
# TODO: handle non-scalartype linked list elements
$dumped .= $node->{data};
$node = $node->{next};
}
$dumped .= ']';
return $dumped;
};
# ref to (linked list node)
# DEV NOTE: for naming conventions, see DEV NOTE in same code section of LinkedList.pm
package # hide from PAUSE indexing
linkedlistnoderef;
our $properties = $properties;
1; # end of class