in reply to OO Coding - way to make it "save" the values?
sub table { my ($self,$table) = @_; $self->{table} = $table; return $self; }
Since this method returns $self, both $tbl1 and $tbl2 are actually the same object.
A good solution would be to distinguish between database and table objects. Or use DBIx::Class right away.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: OO Coding - way to make it "save" the values?
by ultranerds (Hermit) on Jul 27, 2011 at 12:04 UTC | |
by Anonymous Monk on Jul 27, 2011 at 12:15 UTC | |
by ultranerds (Hermit) on Jul 27, 2011 at 12:21 UTC | |
by Anonymous Monk on Jul 27, 2011 at 12:36 UTC | |
by ultranerds (Hermit) on Jul 27, 2011 at 12:49 UTC | |
by ultranerds (Hermit) on Jul 27, 2011 at 13:09 UTC | |
|
Re^2: OO Coding - way to make it "save" the values?
by ultranerds (Hermit) on Jul 27, 2011 at 12:18 UTC |