|
From: Roland G. <RGi...@CP...> - 2001-11-30 21:50:33
|
> > > It would be cool if in addition to the package variables
> > > (affecting all expect() calls), there was a per-object list as well.
> >
> > Not without a complete rewrite. :-)
>
> Well, right now it pretty much says: "if @Expect::Before_List then
> _multiexpect(@Expect::Before_List)." What if it said: "@before_list =
> (@Expect::Before_List, @{${*$self}{before_list}}); if @before_list then
> _multiexpect @before_list"? At any rate, just musing.
Unfortunately it isn't that easy. This would only work for one object, but not
if you want to expect on several objects at once via '-i'. It most certainly
could be done in some way but would add a lot of complexity in terms of
semantics due to hidden parameters. If you want such a thing, you are always
free to order your pattern-callback-list the way you want.
> Cool! That's one of the neatest things I've heard in awhile. I never
> figured that would happen, because he seemed to like TCL so much. So did I,
> originally, but life changed. :)
I still like Tcl, but only for its original intent, namely bringing an
easy-to-understand-and-learn config scripting language to any application
with a minimum of fuss. But I don't want to write large applications in
it anymore due to the quoting hell you get into when you want to smuggle
regexps with variables in them through the parser. And the parsing-at-runtime
didn't help either...
BTW, if anybody can think of requirements for the Expect rewrite, feel free
to throw them my way, I'll collect and forward them. And yes, using the
scripting languages regexp engine is already on the top of the list...
Roland
--
RGi...@cp...
|