[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Update Automake::Variable::variables to agree with its docum
From: |
Raja R Harinath |
Subject: |
Re: [PATCH] Update Automake::Variable::variables to agree with its documentation |
Date: |
Sun, 03 Aug 2003 18:06:29 -0500 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
Hi,
Alexandre Duret-Lutz <address@hidden> writes:
> On Fri, Aug 01, 2003 at 04:30:52PM -0500, Raja R Harinath wrote:
[snip]
>> - foreach my $var (sort variables)
>> + foreach my $var (sort { $a->name cmp $b->name } variables)
>
> Do you know if Perl allows one to setup default comparison function
> for a class (I'm thinking about an equivalent of Python's __cmp__
> method)?
There's the 'overload' pragma. I think it can be used like:
use overload 'cmp' => \&variable_cmp;
I haven't tried if it works.
- Hari
--
Raja R Harinath ------------------------------ address@hidden