Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Syntax question when using Class::DBIby broquaint (Abbot) |
on Dec 09, 2004 at 01:13 UTC ( [id://413393]=note: print w/replies, xml ) | Need Help?? |
There is no problem with using a simple scalar variable when dynamically calling a method, as Fletch illustrated. However if you're using an aggregate variable or an expression you can simply use the can method e.g
Or if you wish to call it directly you need to be a little indirect and take advantage of scalar dereferencing e.g Addendum: On a more practical note you can always access the primary key by using the id accessor method, regardless of what is the name of the actual row; as documented.
HTH
_________
In Section
Seekers of Perl Wisdom
|
|