On 9/2/06, Charles <[EMAIL PROTECTED]> wrote:
Yes. In order to generate the subref, you have to use the "sub" keyword. Change this line in your example:
my $coderef = {
To:
my $coderef = sub {
Seperately, if that example is what you're actually doing, it sounds like you're trying to use this to emulate autoincrementing primary keys. I'm pretty sure most dbms's support such keys natively, without you having to use this select max hack.
-- Brandon
Is there something obvious that I'm missing ?
Yes. In order to generate the subref, you have to use the "sub" keyword. Change this line in your example:
my $coderef = {
To:
my $coderef = sub {
Seperately, if that example is what you're actually doing, it sounds like you're trying to use this to emulate autoincrementing primary keys. I'm pretty sure most dbms's support such keys natively, without you having to use this select max hack.
_______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
