Front page | perl.perl5.porters |
Postings from January 2012
whither study()?
Thread Next
From:
demerphq
Date:
January 29, 2012 01:41
Subject:
whither study()?
Message ID:
CANgJU+WeUK9bWM8+4AtQ7stpR+3MVNatSzR8sJf-2AiBEWAw0Q@mail.gmail.com
study() breaks stuff. It is currently subtly broken. It has been
broken for a long time. It is poorly tested. And ive never actually
seen it used in the wild.
Is it really in Perls interest that I, or anyone else with the chops,
even looks at fixing the bugs related to it? Can we just no-op and
deprecate it?
The other day I was short on time so I disabled an optimization and
pushed it as a smoke branch to see what would happen. It unexpectedly
broke stuff. When I checked what it turned out that the optimization
was hiding from us the fact that study() doesn't work properly.
Basically the tests get handled properly by the optimization, but if
you use slightly different patterns, ones we neither optimize nor
test, it turns out study() causes the regex engine to do the wrong
thing. So disabling the optimization does not actually create a bug,
it just happens to widen its scope by removing something that happens
to work around the bug in one very specific case. But all the other
similar cases are broken anyway.
So, do we really want to maintain this thing? Does anybody know how it
works? Does anybody have any examples where it actually makes a
difference?
I am going to look a /bit/ further into this just to see if it is a
quick fix waiting to happen, but i really do wonder if we should even
be maintaining this thing.
cheers
Yves
--
perl -Mre=debug -e "/just|another|perl|hacker/"
Thread Next
-
whither study()?
by demerphq