KOBAYASI, Hiroaki > YATT-0.0.2 > YATT::Util::DictOrder

Download:
YATT-0.0.2.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

YATT::Util::DictOrder - Dictionary-style ordering and sorting.

SYNOPSIS ^

  use YATT::Util::DictOrder;
  print join ",", dict_sort qw(q3-1 q3 q10a q1);
  # prints "q1,q3,q3-1,q10a"

  print join ",",
     map {$$_[0]}
     sort {dict_order($a, $b, 1)}
     map {[$$_[0], split /(\d+)/, $$_[1]]}
    [qw(foo q3-1)],
    [qw(summer q3)],
    [qw(moe q10a)],
    [qw(romantic q1)];
  # prints "romantic,summer,foo,moe"

DESCRIPTION ^

dict_sort

dict_order

AUTHOR ^

KOBAYASI, Hiroaki (hkoba@cpan.org)

LICENSE ^

This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.