Skip to content

Instantly share code, notes, and snippets.

@plu
Created November 23, 2010 16:46
Show Gist options
  • Save plu/712078 to your computer and use it in GitHub Desktop.
Save plu/712078 to your computer and use it in GitHub Desktop.
package DAO::Example::DB::Base::ResultSet;
use strict;
use warnings;
use base qw/DBIx::Class::ResultSet::HashRef DAO::Example::DB::Base::Any/;
sub active {
my ($rs) = @_;
return $rs->search( { 'me.active' => 1 } );
}
sub inactive {
my ($rs) = @_;
return $rs->search( { 'me.active' => { '!=' => 1 } } );
}
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment