Heap::Simple::XS - An XS implementation of the Heap::Simple interface
# Let Heap::Simple decide which implementation that provides its interface # it will load and use. This may be Heap::Simple::XS or it may not be. # Still, this is the normal way of using Heap::Simple use Heap::Simple; my $heap = Heap::Simple->new(...); # Use heap as described in the Heap::Simple documentation # If for some reason you insist on using this version: use Heap::Simple::XS; my $heap = Heap::Simple::XS->new(...); # Use the XS heap as described in the Heap::Simple documentation
This module provides a pure perl implementation of the interface described in Heap::Simple. Look there for a description.
Even though this implementation is written in C, it fully supports overloading and magic (like ties).
The dirty option will cause scalars for the < and > orders to be stored internally as an NV (double or long double). This means you lose magic, overload and any internal integer representation.
<
>
The < and > order will also cause Array and Hash elements to get their key internally cached as a NV. So indirect changes to the value won't be noticed anymore (but most of the time you shouldn't do that anyways).
Array
Hash
Heap::Simple->implementation will return "Heap::Simple::XS" if it selected this module.
"Heap::Simple::XS"
None.
Heap::Simple, Heap::Simple::Perl
Ton Hospel, <Heap::Simple::XS@ton.iguana.be>
Parts are inspired by code by Joseph N. Hall http://www.perlfaq.com/faqs/id/196
Copyright (C) 2004 by Ton Hospel
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6.1 or, at your option, any later version of Perl 5 you may have available.
To install Heap::Simple::XS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Heap::Simple::XS
CPAN shell
perl -MCPAN -e shell install Heap::Simple::XS
For more information on module installation, please visit the detailed CPAN module installation guide.