Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • If the expense of re-computing the sort key exceeds the expense of caching the sort key, then the ST wins. You merely need a "long enough" list and an "expensive enough" sort key computation.
    • Randal L. Schwartz
    • Stonehenge
  • Sort your data in the database. This will be faster. It also scales better when you just want part of the result set, because you can use LIMIT (or whatever your DB supports).
    • Yeah, what autarch said.

      This is why gave up Class::DBI – it very nearly forces you to do on the Perl side what should be done at the SQL level because it makes it way too difficult to do the latter. First you run into a wall of no documentation, then you often have to put up with annoying verbiage. After reading the source for 15 minutes, I think the following will do what you need:

          all_by_kwalitee => 'SELECT __ESSENTIAL__ FROM __TABLE__ ORDER B

  • Hi,

    You can try Sort::Key that I released some days ago on CPAN, its like the Schwartzian transform, but implemented in C so a bit faster.