Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAML::Syck does not support tied variables [rt.cpan.org #26182] #34

Open
toddr opened this issue May 11, 2017 · 0 comments
Open

YAML::Syck does not support tied variables [rt.cpan.org #26182] #34

toddr opened this issue May 11, 2017 · 0 comments

Comments

@toddr
Copy link
Member

toddr commented May 11, 2017

Migrated from rt.cpan.org#26182 (status was 'stalled')

Requestors:

From fred@thomascorner.com on 2007-04-08 23:34:55:

YAML::Syck 0.84, Perl 5.8.8, OS X 10.4.9
(also seen with previous versions of all the above)
-----
use JSON::Syck;
use Tie::LLHash;

tie (my %resultHash, "Tie::LLHash", {lazy => 1});


$resultHash{'hello'} = 1;
$resultHash{'helli'} = 2;
my $json = JSON::Syck::Dump(\%resultHash);
print($json . "\n");
-----

=> prints
{}

Thanks

Fred

From dmuey@cpan.org on 2007-06-18 23:03:09:

Apparently it tied hashes period:

Tied hashes make YAML::Syck puke...

root@c5release-2 [~]# perl -Mstrict -wle 'use YAML::Syck;my $ref = { "howdy" => { a => 
1 } };print YAML::Syck::Dump( $ref );'
--- 
howdy: 
  a: 1

root@c5release-2 [~]# 

root@c5release-2 [~]# perl -Mstrict -wle 'use YAML::Syck;use Tie::IxHash;tie( my %tied, 
"Tie::IxHash" );%tied = ("howdy" => { a => 1 } );print YAML::Syck::Dump( \%tied );'
--- {}


root@c5release-2 [~]# 

From avar@cpan.org on 2010-05-20 11:32:25:

On Mon Jun 18 19:03:09 2007, DMUEY wrote:
> Apparently it tied hashes period:
> 
> Tied hashes make YAML::Syck puke...
> 
> root@c5release-2 [~]# perl -Mstrict -wle 'use YAML::Syck;my $ref = {
> "howdy" => { a =>
> 1 } };print YAML::Syck::Dump( $ref );'
> ---
> howdy:
>   a: 1
> 
> root@c5release-2 [~]#
> 
> root@c5release-2 [~]# perl -Mstrict -wle 'use YAML::Syck;use
> Tie::IxHash;tie( my %tied,
> "Tie::IxHash" );%tied = ("howdy" => { a => 1 } );print
> YAML::Syck::Dump( \%tied );'
> --- {}

Can you two check if this is due to the hash iterator bugs reported in 
#34166 and #54167?

Also, have a form reply:

(This is a form-reply that isn't specific to your particular report)

YAML::Syck has just acquired one new maintainer (me), it still doesn't
have anyone that *cares* about it. But I'm willing to help solve your
report & release a new version with the fix if it's easy for me.

It now has a Git repository at:

    http://github.com/avar/YAML-Syck

If your report is a patch that fixes a problem, great. Please remake
the patch against Git by forking that repo and sending me a pull
request on GitHub (or an update to this bug if you prefer
git-format-patch(1) or some other repo provider..). Make sure to
include a test for what you fixed.

If your report is some code that fails (and you have a testcase for
it) a patch against the test suite to demonstrate that failure would
be very useful. It's OK if the test crashes and burns, see
Test::More's docs for how to make TODO tests that fail now, but
shouldn't. Even if it segfaults perl C<system $^X => qw/ -Mblib
-MYAML::Syck .../> or something like that and checking the return
value will do.

From toddr@cpan.org on 2010-07-15 19:23:24:

> Can you two check if this is due to the hash iterator bugs reported in 
> #34166 and #54167?

34166 is labeled as a dupe of 54167
54167 is reported to be committed into 1.09

That said... I don't think it fixes things:

# NOT TIED
$>perl -Mstrict -wlE 'use YAML::Syck;say $YAML::Syck::VERSION; my $ref = { "howdy" => { a 
=>1 } };print YAML::Syck::Dump( $ref );'
1.10
--- 
howdy: 
  a: 1

# TIED STILL BROKEN
$>perl -Mstrict -wlE 'use YAML::Syck;say $YAML::Syck::VERSION; use Tie::IxHash;tie( my 
%tied,"Tie::IxHash" );%tied = ("howdy" => { a => 1 } );print YAML::Syck::Dump( \%tied );'
1.10
--- {}

From toddr@cpan.org on 2010-07-19 21:37:02:

All tied variables do not work. I have updated t/yaml-tie.t to show where all ties fall over.

This would be a significant change to the source to support walking a tied variable. 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant