1DBIx::Simple::Result::RUosweOrbjCeocntt(r3i)buted Perl DDoBcIuxm:e:nStiamtpiloen::Result::RowObject(3)
2
3
4
6 DBIx::Simple::Result::RowObject - Simple result row object class
7
9 This class is the default for the "object" and "objects" result object
10 methods. Mainly, it provides syntactic sugar at the expense of
11 performance.
12
13 Instead of writing
14
15 my $r = $db->query('SELECT foo, bar FROM baz')->hash;
16 do_something_with $r->{foo}, $r->{bar};
17
18 you may write
19
20 my $r = $db->query('SELECT foo, bar FROM baz')->object;
21 do_something_with $r->foo, $r->bar;
22
23 This class is a subclass of Object::Accessor, which provides per-object
24 (rather than per-class) accessors. Your records must not have columns
25 names like these:
26
27 * can
28 * ls_accessors
29 * ls_allow
30 * mk_accessor
31 * mk_clone
32 * mk_flush
33 * mk_verify
34 * new
35 * register_callback
36 * ___autoload
37 * ___callback
38 * ___debug
39 * ___error
40 * ___get
41 * ___set
42
43 And of course DESTROY and AUTOLOAD, and anything that new versions of
44 Object::Accessor might add.
45
47 DBIx::Simple::OO is a third party module by Jos Boumans that provided
48 "object" and "objects" to DBIx::Simple. Similar functionality is now
49 built in, in part inspired by DBIx::Simple:OO.
50
51 Using DBIx::Simple 1.33 or newer together with DBIx::Simple::OO 0.01
52 will result in method name clash. DBIx::Simple::Result::RowObject was
53 written to be compatible with DBIx::Simple::OO::Item, except for the
54 name, so "isa" calls still need to be changed.
55
56 In practice, DBIx::Simple 1.33 makes DBIx::Simple::OO obsolete.
57
59 Juerd Waalboer <juerd@cpan.org> <http://juerd.nl/>
60
62 DBIx::Simple
63
64
65
66perl v5.36.0 2023-01-20DBIx::Simple::Result::RowObject(3)