Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jk2addict (4946)

  (email not shown publicly)
AOL IM: chrislaco (Add Buddy, Send Message)
Yahoo! ID: (Add User, Send Message)

Journal of jk2addict (4946)

Monday November 13, 2006
01:57 PM

Sometimes, things Just Work.

[ #31594 ]

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) ... so $storage->search passes it's @_ to DBIC->resultset->search...

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. :-)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.