Unlike Khen1950fx, I don't expect the syntax for tagged data types to be considered simple. As a matter of fact, YAML::Tiny croaks "YAML::Tiny does not support explicit tags" if you feed them to the module
There might be some bug in YAML::Syck which is preventing your case to work (!var foo), in contrast to (!var [foo]). Because
should work just likepirl $> YAML::Syck::Load "--- !!perl/array:var [foo]\n" # long tags $var = bless( [ 'foo' ], 'var' ); pirl $> YAML::Syck::Load "--- !var [foo]\n" # short tags $var = bless( [ 'foo' ], 'var' );
which it doesn't.pirl $> YAML::Syck::Load "--- !!perl/scalar:var foo\n" # long tags, ok +! $var = bless( do{\(my $o = 'foo')}, 'var' ); pirl $> YAML::Syck::Load "--- !var foo\n" # short tags, :( $var = 'foo';
In reply to Re: YAML::Syck and blessed references of scalars
by ferreira
in thread YAML::Syck and blessed references of scalars
by dgaramond2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |