Author: wayland
Date: 2009-02-27 09:16:28 +0100 (Fri, 27 Feb 2009)
New Revision: 25610

Modified:
   docs/Perl6/Spec/S32-setting-library/IO.pod
Log:
IO.pod: Got rid of code, replaced it with spec


Modified: docs/Perl6/Spec/S32-setting-library/IO.pod
===================================================================
--- docs/Perl6/Spec/S32-setting-library/IO.pod  2009-02-27 07:42:32 UTC (rev 
25609)
+++ docs/Perl6/Spec/S32-setting-library/IO.pod  2009-02-27 08:16:28 UTC (rev 
25610)
@@ -61,9 +61,10 @@
 =item uri
 
     IO::Streamable method uri(Str $uri);
+    IO::Streamable sub uri(Str $uri);
 
 Returns an appropriate IO::Streamable descendant, with the type depending on 
the uri 
-passed in.  Here's the mapping:
+passed in.  Here are some example mappings:
 
  URI type IO type
  ======== =======
@@ -71,15 +72,12 @@
  ftp:     IO::Socket::TCP (data channel)
  http:    IO::Socket::TCP
 
-IO::Streamable method uri(Str $uri) {
-       $uri.match(/^<alnum>+\:/);
-       return(&$PROTOCOLS{$1}($uri));
-}
+These can naturally be overridden or added to by other modules.  
 
 =item %PROTOCOLS global variable
 
-For each protocol, stores a subroutine reference that returns the appropriate 
object when 
-the URI is passed in.  
+For each protocol, stores a type name that should be instantiated by calling 
the .uri() 
+constructor on that type, and passing in the appropriate uri.  
 
 =back
 

Reply via email to