[asterisk-dev] Better pattern matching
Vasil Kolev
vasil at ludost.net
Thu Aug 2 10:44:37 CDT 2007
В чт, 2007-08-02 в 11:26 -0400, Leif Madsen написа:
> On Thursday 02 August 2007 10:55:58 am Vasil Kolev wrote:
> > В чт, 2007-08-02 в 10:26 -0400, Leif Madsen написа:
> > > 2) The ability to have an alias or shortcut to say, "use the previous
> > > pattern match", similar to the 'n' priority (or rather, the 's'
> > > priority), so I can write a complex pattern match, BUT only have to write
> > > it on the first priority
> > >
> > > exten => nancy|jim|james,1,NoOp()
> > > exten => p,n,Verbose(1|My current EXTEN is ${EXTEN})
> > > exten => p,n,Playback(silence/1&tt-weasels)
> > > exten => p,n,Hangup()
> >
> > Please rethink this - it would make grep-ing through the files useless,
> > and most of the time it's the fastest way to see what goes where
> > (especially if you need to go through multiple files).
>
> If you wanted to specify the pattern match on every line, nothing I've
> suggested here prevents that, just like the ability to have 'n' doesn't stop
> you from explicitly defining the priority numbers.
>
The problem is the bad habit creation... For example, you have a big
config, and you start using this to simplify it - then it grows, grows,
you try using grep and you're screwed.
Or putting it shorter - there's no considerable gain from this (even
will break formatting and make it a bit harder to read), and will create
nice possibilities for abuse and problems...
I mean, easy grepability/parsebility with cmdline tools is probably one
of the (not many :) ) plus sides of the current extensions language.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: =?UTF-8?Q?=D0=A2=D0=BE=D0=B2=D0=B0?=
=?UTF-8?Q?_=D0=B5?= =?UTF-8?Q?_=D1=86=D0=B8=D1=84=D1=80=D0=BE=D0=B2=D0=BE?=
=?UTF-8?Q?_=D0=BF=D0=BE=D0=B4=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B0?=
=?UTF-8?Q?_=D1=87=D0=B0=D1=81=D1=82?= =?UTF-8?Q?_=D0=BE=D1=82?=
=?UTF-8?Q?_=D0=BF=D0=B8=D1=81=D0=BC=D0=BE=D1=82=D0=BE?=
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20070802/43d5cb12/attachment.pgp
More information about the asterisk-dev
mailing list