[Handel] 0.99_05 - Can't locate object method "uuid"
Christopher H. Laco
claco at chrislaco.com
Thu Aug 24 14:43:15 CEST 2006
ryan lauterbach wrote:
> Hi,
>
> It seems when I call $c->model('Cart')->uuid my app isn't able to find
> the appropriate uuid class. I have UUID and Data::UUID installed.
>
> My Cart model looks like:
>
> package App::M::Cart;
> use strict;
> use warnings;
> use base qw/Handel::Cart/;
>
> __PACKAGE__->storage->connection_info(['dbi:mysql:db, 'user', 'pass']);
>
> 1;
>
>
> I take it Handel handles the rolling of the schema classes, so we don't
> have to create them like with our other tables.
Define 'rolling'....
It will not setup the database table automatically...
>
> I saw something about __PACKAGE__->uuid_class() which I see defined in
> DBIx::Class::UUIDColumns.pm. I tried using this method in my model but
> can't find the method. How can I get my model to find the right uuid
> generator, or how can I specifically set uuid_class in my app?
>
> Thanks,
>
> Ryan
/me mumbles again that all of the catalyst code is broken and hasn't
been updated for 0.99_0x dev versions....
For the uuid issue... add this to your models...
sub uuid {
return shift->storage->new_uuid;
};
You're going to have this problem too:
...in 0.99, items ALWAYS returns an iterator in scalar context....
In line ~306 in your cart controller...
my $item id => $id
});
Change that to:
my $item id => $id
})->first;
-=Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.rawmode.org/pipermail/handel/attachments/20060824/8295e2ea/attachment.pgp
More information about the Handel
mailing list