This tutorial takes you through 2 types of conversion.

From Test::More to Test2::Bundle::More

  • Cannot plan at import
  • use_ok() is gone (use ok ...; still works)
  • require_ok() is gone
  • todo_skip() is gone
  • eq_array(), eq_hash(), and eq_set() are gone
  • explain() is gone
  • new_ok() is gone
  • isa_ok() takes different arguments
  • is_deeply() has better diagnostics
  • $TODO is replaced by todo()

From Test2::Bundle::More to Test2::V0

  • is($r1, $r2) -> ref_is($r1, $r2)
  • is_deeply($a, $b) -> is($a, $b)
Must I?
Do I have to upgrade to Test2?
No. But it is a good idea.

Do I have to update my tests when I upgrade?
No in general, unless you use one of the tiny fraction of broken dists.

What dists are broken?
  • Log::Dispatch::Config::TestLog
  • Net::BitTorrent
  • Test::Able
  • Test::Aggregate
  • Test::Flatten
  • Test::Group
  • Test::ParallelSubtest
  • Test::Pretty
  • Test::Wrapper