The stupid question is the question not asked | |
PerlMonks |
Re^3: Object accessors with unknown databy duelafn (Parson) |
on Jan 26, 2015 at 13:32 UTC ( [id://1114521]=note: print w/replies, xml ) | Need Help?? |
One of the dangers with dynamic fields is the potential for collision (what if a column is titled "new"?). However, if you wish to try it out anyway, I would use AUTOLOAD. The example in the documentation does exactly what you want (though note the comment that says "this is a terrible way to implement accessors"). Good Day,
In Section
Seekers of Perl Wisdom
|
|