OSSP CVS Repository

ossp - Difference in ossp-pkg/uuid/perl/uuid.pod versions 1.7 and 1.8
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/uuid/perl/uuid.pod 1.7 -> 1.8

--- uuid.pod     2005/08/30 20:00:32     1.7
+++ uuid.pod     2005/08/31 08:55:18     1.8
@@ -44,12 +44,31 @@
 and node based), version 3 (name based, MD5), version 4 (random number
 based) and version 5 (name based, SHA-1).
 
-B<OSSP::uuid> provides two Perl APIs:
+B<OSSP::uuid> provides three Perl APIs:
+
+=head2 TIE-STYLE API
+
+The TIE-style API is a functionality-reduced wrapper around the OO-style
+API and intended for very high-level convenience programming:
+
+=over 4
+
+=item C<use OSSP::uuid;>
+
+=item B<tie>C< my $uuid, 'OSSP::uuid::tie', $mode, ...;>
+
+=item C<$uuid = [ $mode, ... ];>
+
+=item C<print "UUID=$uuid\n";>
+
+=item C<untie $uuid;>
+
+=back
 
 =head2 OO-STYLE API
 
 The OO-style API is a wrapper around the C-style API and intended for
-high-level and regular programming.
+high-level regular programming.
 
 =over 4
 
@@ -141,6 +160,15 @@
 C-style API. Error handling is omitted here for easier reading, but has
 to be added for production-quality code.
 
+  #   TIE-style API (very high-level)
+  use OSSP::uuid;
+  tie my $uuid, 'OSSP::uuid::tie';
+  $uuid = [ "v1" ];
+  print "UUIDs: $uuid, $uuid, $uuid\n";
+  $uuid = [ "v3", "ns:URL", "http://www.ossp.org/" ];
+  print "UUIDs: $uuid, $uuid, $uuid\n";
+  untie $uuid;
+
   #   OO-style API (high-level)
   use OSSP::uuid;
   my $uuid    = new OSSP::uuid;

CVSTrac 2.0.1