Skip to content

Instantly share code, notes, and snippets.

@yanick
Created March 31, 2013 00:32
Show Gist options
  • Save yanick/5278968 to your computer and use it in GitHub Desktop.
Save yanick/5278968 to your computer and use it in GitHub Desktop.
How to have $c->rs('MyTable') instead of $c->model('DBIx::MyTable')
# in your main application class (e.g. lib/S****T***.pm):
sub rs {
my ( $c, $table ) = @_;
my $model = 'DBIx::' . $table;
return $c->model($model);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment