"Father Chrysostomos via RT" <perlbug-followup@perl.org> wrote
on Mon, 14 May 2012 14:34:17 PDT:
> Well @hash{<foo bar>} looks prettier than @hash{qw<foo bar>},
> doesn't it?
Much prettier. I use it all the time, too.
--tom
package UCA;
use v5.10.1;
use strict;
use warnings;
use parent "Exporter";
our @EXPORT = <UCA{,1,2,3,4}>;
use Unicode::Collate;
for my $strength ( 1 .. 4 ) {
no strict "refs";
*{ "UCA$strength" } = sub(_) {
state $coll = new Unicode::Collate::
level => $strength,
variable => "Non-Ignorable",
;
return $coll->getSortKey($_[0]);
};
}
{
no warnings "once";
*UCA = \&UCA1;
}
Thread Previous
|
Thread Next