* Mike Doherty <dohe...@cs.dal.ca> [2012-04-11 01:10]:
> I typically use_ok(...) or BAIL_OUT. If that's the only way to use
> use_ok safely, then maybe it should do that for you automatically.

I don’t think changing its meaning so drastically is feasible now.

Also, this leaves the issue that if it (or any other replacement of it
with different semantics) becomes a recommended interface then the
behaviour of `use` in lexical scope probably *should* be duplicated.

But that is complexity that ideally should be shed.

I think the ideal way to handle `use` would be a `bail_on_use_failure`
switch that intercepts `use` errors and turns them into BAIL_OUT, so
that plain `use` can be used for everything – assuming this can be done
with less complexity than duplicating `use`.

Then `use_ok` would just completely deprecated.

But it’ll take a while for the entire CPAN to move off of it, so it
can’t be deprecated too aggressively. However if it doesn’t make any
noise, then shedding it will never happen.

So maybe announce the deprecation during one perl release cycle and then
add a once-per-testsuite warning in the next?

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Reply via email to