note
ikegami
<p>Polymorphic API:
<p>If this is an OO-based module, you could pass a protocol version to the constructor. (Kinda like many file formats include a version.) If it's not, you could write your own <c>import</c> sub and use <c>use module "1.0.0";</c> instead of <c>use module 1.0.0;</c>. This would be a bit error prone.
<p>Parallel APIs:
<p>The other approach is add to the interface instead of replacing it. You can use two different module names: "module" for 1.x.x and "module2" for 2.x.x, or you can add methods instead of replacing old ones (<c>do_something2</c> is the new interface for <c>do_someting</c>).
998882
998882