From: Gabor S. <ga...@sz...> - 2014-08-25 09:43:55
|
Hi Salvador, thanks for your reply, I hope it is ok that I send my reply back to the mailing list as this is the interest of all the people who might be subscribed. If you are talking about the change I Implemented in 1.30, that's while changing backward compatibility of the code the behavior was actually incorrect and buggy earlier. I really hope people have not relied on that behavior. Maybe I could add some warnings if I notice people rely on it and point them to some explanation how to fix it. (Thinking aloud: have a flag that will indicate if the latest call to ->expect was successful or not and if the user calls ->after or ->match when the last expect was unsuccessful it will give a warning and a pointer to the explanation. If you meant the elimination of the non-OOP way, actually I have no idea how that could be even used today. I don't recall seeing any example with such code and based on the documentation and reading the source code I could not come up with an example so far. So I am not sure if that's even in use. That's why I was asking for help. Something like Expect2 might be a good idea, I'll give it some thought. Gabor On Mon, Aug 25, 2014 at 12:00 PM, Salvador Fandino <sfa...@ya...> wrote: > > > > Hi Gabor > > >________________________________ > > > > > From: Gabor Szabo <ga...@sz...> > >To: exp...@li... > >Sent: Friday, August 22, 2014 12:06 PM > >Subject: [Expectperl-discuss] Expect 1.30 - change in behavior > > > > > > > >Hi > > > > > >version 1.30 is on CPAN now. It has a change in behavior correcting a bug. > >From now on ->after and ->match will return undef if the last call to > ->expect has failed. > > > > > >(Earlier they returned the information from the last successful expect) > > > > > >Please check if your code still works after the upgrade! > > > > > > > > > >I also have a question: Do you know any code that uses the Expect module > >in a non OOP-way? If yes, I'd urgently need examples. Otherwise I am > going to > >remove this feature. > > > > Expect is often used by sys-admins with limited Perl skills, who only > program occasionally and who write ugly and weak code that is very sensible > to minor changes. The module has been "stable" for a long time, so, are you > sure it is a good idea to perform mayor changes on it and even remove > features? it may break lots of code. > > > Wouldn't it be better to fork it into another module (Expect2)? That would > give you the freedom to redo it to your liking, without worrying too much > about backward compatibility. > > Note that I don't want to discourage you in any way. I am very pleased to > see you working on getting it on shape! > > |