[svn:parrot] r44543 - in trunk: . runtime/parrot/library runtime/parrot/library/YAML runtime/parrot/library/YAML/Dumper

coke at svn.parrot.org coke at svn.parrot.org
Sun Feb 28 05:02:27 UTC 2010


Author: coke
Date: Sun Feb 28 05:02:25 2010
New Revision: 44543
URL: https://trac.parrot.org/parrot/changeset/44543

Log:
move YAML::Dumper::* to YAML;Dumper;*

Listed in deprecated.pod for a previous release, but no ticket listed.

Modified:
   trunk/DEPRECATED.pod
   trunk/runtime/parrot/library/YAML/Dumper.pir
   trunk/runtime/parrot/library/YAML/Dumper/Base.pir
   trunk/runtime/parrot/library/YAML/Dumper/Default.pir
   trunk/runtime/parrot/library/yaml_dumper.pir

Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod	Sun Feb 28 04:58:49 2010	(r44542)
+++ trunk/DEPRECATED.pod	Sun Feb 28 05:02:25 2010	(r44543)
@@ -309,8 +309,8 @@
 =item Library name changes [eligible in 2.1]
 
 The use of C<::> a namespace separator is deprecated.  Core libraries will
-change to use multi-level keys instead.  For example, C<YAML::Dumper> will
-change to C<YAML; Dumper>.  Affected libraries also include: C<SDL>
+change to use multi-level keys instead.  For example, C<'YAML::Dumper'> changes
+to C<['YAML'; 'Dumper']>.  Affected libraries also include: C<SDL>
 and C<PCRE::NCI>.
 
 =back

Modified: trunk/runtime/parrot/library/YAML/Dumper.pir
==============================================================================
--- trunk/runtime/parrot/library/YAML/Dumper.pir	Sun Feb 28 04:58:49 2010	(r44542)
+++ trunk/runtime/parrot/library/YAML/Dumper.pir	Sun Feb 28 05:02:25 2010	(r44543)
@@ -3,19 +3,19 @@
 
 .sub __library_data_dumper_onload :load
     .local pmc yd_class
-    yd_class = get_class "YAML::Dumper"
+    yd_class = get_class ['YAML'; 'Dumper']
     if null yd_class goto load_library
 
     goto END
 
   load_library:
         load_bytecode 'YAML/Dumper/Default.pbc'
-        newclass $P0, "YAML::Dumper"
+        newclass $P0, ['YAML'; 'Dumper']
 END:
     .return ()
 .end
 
-.namespace ["YAML::Dumper"]
+.namespace ['YAML'; 'Dumper']
 
 .sub yaml :method
     .param pmc dump
@@ -36,7 +36,7 @@
     .local pmc ydd_class
 
     push_eh ERROR2
-        ydd_class = get_class "YAML::Dumper::Default"
+        ydd_class = get_class ['YAML'; 'Dumper'; 'Default']
         style     = ydd_class."new"()
     pop_eh
 
@@ -52,14 +52,14 @@
 
 ERROR2:
     pop_eh
-    print "can not find class YAML::Dumper::Default!\n"
+    print "can not find class ['YAML'; 'Dumper'; 'Default']!\n"
     end
     .return ( 0 )
 ERROR:
     print "Syntax:\n"
-    print "YAML::Dumper::yaml( pmc )\n"
-    print "YAML::Dumper::yaml( pmc, name )\n"
-    print "YAML::Dumper::yaml( pmc, name, indent )\n"
+    print "yaml( pmc )\n"
+    print "yaml( pmc, name )\n"
+    print "yaml( pmc, name, indent )\n"
     .return ( 0 )
 .end
 

Modified: trunk/runtime/parrot/library/YAML/Dumper/Base.pir
==============================================================================
--- trunk/runtime/parrot/library/YAML/Dumper/Base.pir	Sun Feb 28 04:58:49 2010	(r44542)
+++ trunk/runtime/parrot/library/YAML/Dumper/Base.pir	Sun Feb 28 05:02:25 2010	(r44543)
@@ -28,12 +28,12 @@
 
 .sub __library_data_dumper_base_onload :load
     .local pmc ydb_class
-    ydb_class = get_class "YAML::Dumper::Base"
+    ydb_class = get_class ['YAML'; 'Dumper'; 'Base']
     if null ydb_class goto create_ydb
     goto END
 
   create_ydb:
-    newclass $P0, "YAML::Dumper::Base"
+    newclass $P0, ['YAML'; 'Dumper'; 'Base']
     addattribute $P0, "yaml"
     addattribute $P0, "level"
     addattribute $P0, "indention"
@@ -43,7 +43,7 @@
     .return ()
 .end
 
-.namespace ["YAML::Dumper::Base"]
+.namespace ['YAML'; 'Dumper'; 'Base']
 
 =item style."prepare"( yaml, indent )
 

Modified: trunk/runtime/parrot/library/YAML/Dumper/Default.pir
==============================================================================
--- trunk/runtime/parrot/library/YAML/Dumper/Default.pir	Sun Feb 28 04:58:49 2010	(r44542)
+++ trunk/runtime/parrot/library/YAML/Dumper/Default.pir	Sun Feb 28 05:02:25 2010	(r44543)
@@ -20,19 +20,19 @@
 
 .sub __library_data_dumper_default_onload :load
     .local pmc ydb_class
-    ydb_class = get_class "YAML::Dumper::Default"
+    ydb_class = get_class ['YAML'; 'Dumper'; 'Default']
     if null ydb_class goto create_ydb
     goto END
 
   create_ydb:
     load_bytecode 'YAML/Dumper/Base.pbc'
-    get_class $P0, "YAML::Dumper::Base"
-    subclass $P0, $P0, "YAML::Dumper::Default"
+    get_class $P0, ['YAML'; 'Dumper'; 'Base']
+    subclass $P0, $P0, ['YAML'; 'Dumper'; 'Default']
 END:
     .return ()
 .end
 
-.namespace ["YAML::Dumper::Default"]
+.namespace ['YAML'; 'Dumper'; 'Default']
 
 =head1 METHODS
 

Modified: trunk/runtime/parrot/library/yaml_dumper.pir
==============================================================================
--- trunk/runtime/parrot/library/yaml_dumper.pir	Sun Feb 28 04:58:49 2010	(r44542)
+++ trunk/runtime/parrot/library/yaml_dumper.pir	Sun Feb 28 05:02:25 2010	(r44543)
@@ -34,7 +34,7 @@
     say ''
     say "    .local pmc foo, yaml_dumper"
     say "    foo         = new 'ResizablePMCArray'"
-    say "    yaml_dumper =  new 'YAML::Dumper'"
+    say "    yaml_dumper =  new ['YAML'; 'Dumper']"
     say ''
     say "    yaml_dumper.'yaml'( foo, 'foo' )"
     say ".end"
@@ -148,13 +148,13 @@
     .local pmc yd_class
     .local int is_defined
 
-    get_class yd_class, "YAML::Dumper"
+    get_class yd_class, ['YAML'; 'Dumper']
     if null yd_class goto load_yd_pir
     goto TYPE_OK
 
   load_yd_pir:
     load_bytecode "YAML/Dumper.pbc"
-    get_class yd_class, "YAML::Dumper"
+    get_class yd_class, ['YAML'; 'Dumper']
     if null yd_class goto no_class
     goto TYPE_OK
 
@@ -164,13 +164,13 @@
 TYPE_OK:
 
     errorsoff .PARROT_ERRORS_GLOBALS_FLAG
-    self = get_global ['YAML::Dumper'], 'global'
+    self = get_global ['YAML'; 'Dumper'], 'global'
     errorson .PARROT_ERRORS_GLOBALS_FLAG
     if null self goto create_type
 
 create_type:
-    new self, "YAML::Dumper"
-    set_global ['YAML::Dumper'], 'global', self
+    new self, ['YAML'; 'Dumper']
+    set_global ['YAML'; 'Dumper'], 'global', self
 
 END:
     .return( self )


More information about the parrot-commits mailing list