It's the small things that make my day sometimes.
Somehow in my flurry of Handel 1.0 programming, I've missed the obvious: how to order the results of cart/item searches. [kudos to Kaare for pointing that out] So I thought to myself "just pass the search method \%options down through storage, and into DBIC resultset \%attributes. Sounds easy.
So, in my cart code, I just altered one line:
# my $results = $storage->search($filter);
my $results = $storage->search($filter, $opts);
What makes me happy is the fact that somewhere along the line, I made it a point to always just pass @_ (sans a shifted $self)
Sames goes for things like $result->add_item(...), which passes it's @_ to $storage->add_item, which passed it's @_ to DBIC->resultset->create...
I'm sure that's obvious practice to some, but that forethought just saved me a lot of work.
Sometimes, things Just Work. 0 Comments More | Login | Reply /