Changes between Version 4 and Version 5 of PerlTagScheme
- Timestamp:
- 06/29/06 01:13:48 (7 years ago)
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.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. 2 2 3 3 These are the unblessed Perl basic types: 4 4 5 5 {{{ 6 ! !perl/hash # hash reference7 ! !perl/array # array reference8 ! !perl/scalar # scalar reference9 ! !perl/code # code reference10 ! !perl/io # io reference11 ! !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 above6 !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 14 14 }}} 15 15 … … 17 17 18 18 {{{ 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' 21 21 etc... 22 22 }}} … … 27 27 28 28 {{{ 29 ! !perl/object:Foo::Bar30 ! !perl/:Foo::Bar31 ! !perl/Foo::Bar29 !perl/object:Foo::Bar 30 !perl/:Foo::Bar 31 !perl/Foo::Bar 32 32 }}} 33 33 34 34 Note: the first form, while more verbose, more closely matches what Python and Ruby do. (I think) See [wiki:PythonTagScheme]. 35 35 36 The '! !perl' forms are only consumable by Perl. To share objects with Python, maybe use this form:36 The '!perl' forms are only consumable by Perl. To share objects with Python, maybe use this form: 37 37 38 38 {{{ 39 ! !object:Foo.Bar39 !object:Foo.Bar 40 40 }}}
