Created
January 6, 2018 01:35
-
-
Save perlpunk/ba7c5ffe3a91070cdd591d7f380cbbc7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use YAML; | |
| use Data::Dumper; | |
| my $yaml = <<"EOM"; | |
| --- !!perl/hash:Foo | |
| b: B | |
| a: A | |
| EOM | |
| my $data = Load $yaml; | |
| say Dumper $data; | |
| say Dump $data; | |
| __END__ | |
| $VAR1 = bless( { | |
| 'b' => 'B', | |
| 'a' => 'A' | |
| }, 'Foo' ); | |
| --- !!perl/hash:Foo | |
| a: A | |
| b: B |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use YAML; | |
| use Data::Dumper; | |
| $YAML::Preserve = 1; | |
| my $yaml = <<"EOM"; | |
| --- !!perl/hash:Foo | |
| b: B | |
| a: A | |
| EOM | |
| my $data = Load $yaml; | |
| say Dumper $data; | |
| say Dump $data; | |
| __END__ | |
| $VAR1 = bless( { | |
| 'b' => 'B', | |
| 'a' => 'A' | |
| }, 'Foo' ); | |
| --- !!perl/hash:Foo | |
| a: ~ | |
| b: ~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment