On Thu, Jul 29, 2010 at 5:15 AM, Leon Timmermans <faw...@gmail.com> wrote:
> On Thu, Jul 29, 2010 at 3:24 AM, Darren Duncan <dar...@darrenduncan.net>
>> Some possible examples of customization:
>> $foo ~~ $a..$b :QuuxNationality # just affects this one test
> I like that
>> $bar = 'hello' :QuuxNationality # applies anywhere the Str value is used
> What if you compare a QuuxNationality Str with a FooNationality Str?
> That should blow up. Also it can lead to action at a distance. I don't
> think that's the way to go.
I think it's an elegant use of encapsulation- keeping a string's
locale with the string. If the you want to compare two strings with
different collations, either-
$foo ~~ $a..$b :QuuxNationality # override the locales for this test
$foo ~~ $a..$b # Perl warns about conflict, and falls back to its default