Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I understand that importance. There is a reference to the POD to look at the README for comparison to similar modules. Here is an advanced copy of the README.
Tie::SortedHash version 1.00 =========================== INTRODUCTION This module allows you to retrieve keys/values from a hash in a sorted + order. COMPARISON Q: Is this module any different from Tie::IxHash or Tie::SortHash? A: Yes, let me explain *** Tie::IxHash vs Tie::SortedHash *** 1. Preserves insertion order - maintains order regardless of insertio +n 2. Provides static simple sort on keys/values - provides dynamic arbi +trary sort routine *** Tie::SortHash vs Tie::SortedHash *** 1. Uses psuedo hashes - uses an array 2. It uses eval string for sort - uses a code ref for sort 3. Loops (keys^2 + keys)/2 times through hash - retrieves array value 4. Inflexible calling syntax - flexible/expandable calling syntax 5. Extremely slow - provides for optimization where applicable WHAT IS THIS ABOUT POSSIBLE OPTIMIZATION? There are two circumstances when you can safley enable optimizations 1. You have a simple one-level hash 2. You have a complex hash, but the sort routine only depends on the keys/values of the root level By enabling optimization, the array that stores the sorted order will only be re-generated when a change to the hash is detected. Unfortuna +tely, it is not possible to detect when the hash changes below the root leve +l, and the sort routine may depend on it. WHY I WROTE IT Tie::SortHash was a perfect answer to a question on perlmonks (http:// Unfortunately it had a lot of issues with it and attempts to contact t +he author went unanswered. Originally, I had intended just to correct that module, b +ut it became nearly impossible to do that and maintain backwards compatability. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install COPYRIGHT Copyright (c) 2003 Joshua Gatcomb. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Cheers - L~R

In reply to Re: Re:x2 Any Point in Uploading Tie::SortedHash (say why) by Limbic~Region
in thread Any Point in Uploading Tie::SortedHash by Limbic~Region

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-06-15 20:23 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.