[Dancer-users] Routes with captures
Alexis Sukrieh
sukria at sukria.net
Tue Jun 1 09:01:51 CEST 2010
On 31/05/2010 20:18, Marc Chantreux wrote:
> On Mon, May 31, 2010 at 10:20:48PM +1000, Daniel Pittman wrote:
>>> r('/stuff/(.*+))
>>> qr/\/stuff\/(.*+)/
>> Er, isn't 'r' it literally identical to 'qr(/stuff/(.*+))' in this case?
>
> yes it is! plus: you don't have to know what r() do: qr is just a perl
> operator.
>
>>> So I would vote for applying your patch, but without replacing r('') which
>>> has a good reason to live, I think.
>>
>> The only really good reason I can see, right now, is backward compatibility,
>
> +1
After reading the whole thread, I must say this makes sense. Now I see
r() as something akward and unlogical.
We can say that any call to r() will now trigger a warning like: "the
r() method is deprectated, use qr// instead".
This warning can be kept until version 1.2.
In Dancer 1.2, we will drop it.
About the captures in splat (mentioned in another mail) I'm OK with it
but maybe splat isn't the appropriate accessor. It's intended to get all
anonymous captures as a list. Here we may want to add another keyword,
like "captures" for instance.
Any thought about that?
--
Alexis Sukrieh
More information about the Dancer-users
mailing list