I think this is a bug anyway, but it could be a usage error. When using an on_set trigger, the return value from the setter is always an empty-string, but the set seems to still be working.
In my attached test example I have an object with a column "data", and a
column "more_data", the "more_data" column uses a trivial on_set trigger.
The return value of $a->data("xyz") is always the value that I passed in. The
return value of $a->more_data("xyz") is always "".
I have attached a quick test case to verify this.
Thanks,
-Cory
The test output is:
1..6
ok 1 - check data value
ok 2 - check more data value
ok 3 - check data set
ON SET CALLED
not ok 4 - check more_data set
# Failed test 'check more_data set'
# in ./test.pl at line 12.
# got: ''
# expected: 'new_more_data'
ok 5 - check data value
ok 6 - check more_data value
# Looks like you failed 1 test of 6.
test.pl
Description: Perl program
Testing.pm
Description: application/perl-module
CREATE TABLE tableA (
id SERIAL NOT NULL PRIMARY KEY,
data VARCHAR(255),
more_data VARCHAR(255)
);
insert into tableA values(1,"abc", "def");
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Rose-db-object mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rose-db-object
