in reply to YAML::Syck and blessed references of scalars
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';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: YAML::Syck and blessed references of scalars
by dgaramond2 (Monk) on Mar 23, 2007 at 11:55 UTC |