|o||turns on strict and warnings|
|o||sets your parent class|
|o||sets your mro to c3|
See SETTING DEFAULT IMPORT OPTIONS for information on setting these schema wide.
use DBIx::Class::Candy::ResultSet -base => MyApp::Schema::ResultSet;
use DBIx::Class::Candy::ResultSet -components => [Helper::ResultSet::Me];
DBIx::Class::Candy::ResultSet allows you to set which components you are using at import time.
use DBIx::Class::Candy::ResultSet -perl5 => v20;
I love the new features in Perl 5.20, so I felt that it would be nice to remove the boiler plate of doing use feature :5.20 and add it to my sugar importer. Feel free not to use this.
Eventually you will get tired of writing the following in every single one of your resultsets:
You can set all of these for your whole schema if you define your own Candy::ResultSet subclass as follows:
Note the $_ || in base. All of these methods are passed the values passed in from the arguments to the subclass, so you can either throw them away, honor them, die on usage, or whatever. To be clear, if you define your subclass, and someone uses it as follows:
Arthur Axel fREW Schmidt <email@example.com>
This software is copyright (c) 2015 by Arthur Axel fREW Schmidt.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
|perl v5.20.3||DBIX::CLASS::CANDY::RESULTSET (3)||2015-11-21|