Skip Menu |

This queue is for tickets about the Object-InsideOut CPAN distribution.

Report information
The Basics
Id: 30533
Status: resolved
Priority: 0/
Queue: Object-InsideOut

People
Owner: Nobody in particular
Requestors: michael_lee_squires [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 3.26
Fixed in: 3.29



Subject: Field definitions create confusing entries in dump()
Create a class using OIO and declare these fields: my @normal :Field :Acc(normal) :Arg('Name' => 'normal', 'Default' => 23); my @std_all :Field :Std_All(std_all); my @acc_normal_arg_explicit :Field :Std(acc_normal_arg_explicit) :Arg('Name' => 'acc_normal_arg_explicit', 'Default' => 0); In a test case do this: my $obj = TestOIO->new(); $obj->set_std_all(42); diag ($obj->dump(1)); Here are the results of the dump() call: # Testing TestOIO 0.0.1 # [ # 'TestOIO', # { # 'TestOIO' => { # 'std_all' => 42, # 'normal' => 23, # 'get_acc_normal_arg_explicit' => 0, # 'acc_normal_arg_explicit' => 0 # } # } # ] I was surprised to the the "get_acc_normal_arg_explicit" show up in the dump() output. They do refer to the same value - if you set the value either via set_acc_normal_arg_explicit or within the object directly, both have the same value in the dump.
Subject: OIO_test.tar
Download OIO_test.tar
application/x-tar 10k

Message body not shown because it is not plain text.

michael_lee_squires wrote: Show quoted text
> Create a class using OIO and declare these fields: > my @normal :Field > :Acc(normal) > :Arg('Name' => 'normal', 'Default' => 23); > > my @std_all :Field > :Std_All(std_all); > > my @acc_normal_arg_explicit :Field > :Std(acc_normal_arg_explicit) > :Arg('Name' => 'acc_normal_arg_explicit', > 'Default' => 0); > > In a test case do this: > my $obj = TestOIO->new(); > > $obj->set_std_all(42); > > diag ($obj->dump(1)); > > Here are the results of the dump() call: > # Testing TestOIO 0.0.1 > # [ > # 'TestOIO', > # { > # 'TestOIO' => { > # 'std_all' => 42, > # 'normal' => 23, > # 'get_acc_normal_arg_explicit' => 0, > # 'acc_normal_arg_explicit' => 0 > # } > # } > # ] > > I was surprised to the the "get_acc_normal_arg_explicit" show up in the > dump() output. They do refer to the same value - if you set the value > either via set_acc_normal_arg_explicit or within the object directly, > both have the same value in the dump.
Thanks for the bug report and test case. I have fixed this bug and incorporated similar tests into the test suite. I'll upload the fixed version shortly.