Created
March 31, 2013 00:32
-
-
Save yanick/5278968 to your computer and use it in GitHub Desktop.
How to have $c->rs('MyTable') instead of $c->model('DBIx::MyTable')
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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