Changes between Version 4 and Version 5 of PerlTagScheme


Ignore:
Timestamp:
06/29/06 01:13:48 (8 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PerlTagScheme

    v4 v5  
    1 Tags in the form of '!!perl/...' have a full form of !<tag:yaml.org,2002:perl/...>. This implies that implementation that use '!!perl/...' for tagging, should strive to stick with in the confines described in this document. 
     1Tags in the form of '!perl/...' have a full form of !<tag:yaml.org,2002:perl/...>. This implies that implementation that use '!perl/...' for tagging, should strive to stick with in the confines described in this document. 
    22 
    33These are the unblessed Perl basic types: 
    44 
    55{{{ 
    6 !!perl/hash     # hash reference 
    7 !!perl/array    # array reference 
    8 !!perl/scalar   # scalar reference 
    9 !!perl/code     # code reference 
    10 !!perl/io       # io reference 
    11 !!perl/glob     # a glob (not a ref) 
    12 !!perl/regexp   # a regexp (not a ref) 
    13 !!perl/ref      # a container ref to any of the above 
     6!perl/hash     # hash reference 
     7!perl/array    # array reference 
     8!perl/scalar   # scalar reference 
     9!perl/code     # code reference 
     10!perl/io       # io reference 
     11!perl/glob     # a glob (not a ref) 
     12!perl/regexp   # a regexp (not a ref) 
     13!perl/ref      # a container ref to any of the above 
    1414}}} 
    1515 
     
    1717 
    1818{{{ 
    19 !!perl/hash:Foo::Bar   # hash ref blessed with 'Foo::Bar' 
    20 !!perl/glob:Foo::Bar   # glob blessed with 'Foo::Bar' 
     19!perl/hash:Foo::Bar   # hash ref blessed with 'Foo::Bar' 
     20!perl/glob:Foo::Bar   # glob blessed with 'Foo::Bar' 
    2121etc... 
    2222}}} 
     
    2727 
    2828{{{ 
    29 !!perl/object:Foo::Bar 
    30 !!perl/:Foo::Bar 
    31 !!perl/Foo::Bar 
     29!perl/object:Foo::Bar 
     30!perl/:Foo::Bar 
     31!perl/Foo::Bar 
    3232}}} 
    3333 
    3434Note: the first form, while more verbose, more closely matches what Python and Ruby do. (I think) See [wiki:PythonTagScheme]. 
    3535 
    36 The '!!perl' forms are only consumable by Perl. To share objects with Python, maybe use this form: 
     36The '!perl' forms are only consumable by Perl. To share objects with Python, maybe use this form: 
    3737 
    3838{{{ 
    39 !!object:Foo.Bar 
     39!object:Foo.Bar 
    4040}}}