[Handel] Can't locate object method "items" via package
"Handel::Iterator
Bernard FRIT
bernard.frit at gmail.com
Thu Sep 29 16:57:04 CEST 2005
Hi,
Just using Handel 0.24 with Catalyst I got the above message when
executing the following code :
sub weight : Private {
my ($self, $c) = @_;
my $weight ;
my $order = Handel::Order->load({
id => $c->stash->{'orderid'}
}, RETURNAS_ITERATOR
);
my $iterator = $order->items;
while (my $item = $iterator->next) {
$weight = $weight + ($sql->weight($item->sku)); # get the
weight of an item
};
$c->stash->{'weight'} = $weight ;
};
I tried a simpler version :
my $order = Handel::Order->load({
id => '9A0C33F8-30DF-11DA-9820-DB35F053F773'
);
my $iterator = $order->items;
while (my $item = $iterator->next) {
print $item->sku, "\n";
};
and got the same error...
Could you tell me where I am wrong ?
--
Bernard
More information about the Handel
mailing list