Skip to content

Instantly share code, notes, and snippets.

@perlpunk
Created January 6, 2018 01:35
Show Gist options
  • Select an option

  • Save perlpunk/ba7c5ffe3a91070cdd591d7f380cbbc7 to your computer and use it in GitHub Desktop.

Select an option

Save perlpunk/ba7c5ffe3a91070cdd591d7f380cbbc7 to your computer and use it in GitHub Desktop.
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
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