Author: larry
Date: Wed Mar  7 21:35:52 2007
New Revision: 14319

Modified:
   doc/trunk/design/syn/S02.pod

Log:
Definition of version sorting order.


Modified: doc/trunk/design/syn/S02.pod
==============================================================================
--- doc/trunk/design/syn/S02.pod        (original)
+++ doc/trunk/design/syn/S02.pod        Wed Mar  7 21:35:52 2007
@@ -2546,6 +2546,44 @@
 it as a named argument, in which case saying C<< :ver<1.2.3beta> >> is fine.
 See S11 for more on using versioned modules.
 
+Version objects have a predefined sort order that follows most people's
+intuition about versioning: each sorting position sorts numerically
+between numbers, alphabetically between alphas, and alphabetics in a
+position before numerics.  Numbers ignore leading zeros. For splitting
+into sort positions, if any alphabetics (including underscore) are
+immediately adjacent to a number, a dot is assumed between them,
+so these are all equivalent:
+
+    1.2.1alpha1
+    1.2.1.alpha1
+    1.2.1alpha.1
+    1.2.1.alpha.1
+
+And these are also equivalent:
+
+    1.2.1_01
+    1.2.1_1
+    1.2.1._1
+    1.2.1_1
+    1.2.1._.1
+    001.0002.0000000001._.00000000001
+
+So these are in sorted version order:
+
+    1.2.0.999
+    1.2.1_01
+    1.2.1_2
+    1.2.1_003
+    1.2.1a1
+    1.2.1.alpha1
+    1.2.1b1
+    1.2.1.beta1
+    1.2.1.gamma
+    1.2.1α1
+    1.2.1β1
+    1.2.1γ
+    1.2.1
+
 =back
 
 =head1 Context

Reply via email to