DBIx::Class::Helper::ResultSet::BooleanMethods - Automatically create search methods for boolean columns.
Version 0.05
This module automatically creates search method helpers for boolean columns.
In your ResultSet class, add:
use Role::Tiny::With qw(with); use DBIx::Class::Helper::ResultSet::BooleanMethods; with(BooleanMethods(__PACKAGE__));
Say your table has a boolean column named "paid", using this role will act as if you added these methods:
sub paid { my $self = shift; return $self->search( { 'paid' => 'true', } ); }; sub not_paid { my $self = shift; return $self->search( { 'paid' => 'false', } ); };
Mathieu Arnold, <mat at cpan.org>
<mat at cpan.org>
Please report any bugs or feature requests to bug-dbix-class-helper-resultset-booleanmethods at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=DBIx-Class-Helper-ResultSet-BooleanMethods. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-dbix-class-helper-resultset-booleanmethods at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc DBIx::Class::Helper::ResultSet::BooleanMethods
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
https://rt.cpan.org/NoAuth/Bugs.html?Dist=DBIx-Class-Helper-ResultSet-BooleanMethods
CPAN Ratings
https://cpanratings.perl.org/d/DBIx-Class-Helper-ResultSet-BooleanMethods
Search CPAN
https://metacpan.org/release/DBIx-Class-Helper-ResultSet-BooleanMethods
Thanks to the people of #dbix-class, they were very helpful in pointing me to the right direction.
This software is Copyright (c) 2019 by Mathieu Arnold.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install DBIx::Class::Helper::ResultSet::BooleanMethods, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class::Helper::ResultSet::BooleanMethods
CPAN shell
perl -MCPAN -e shell install DBIx::Class::Helper::ResultSet::BooleanMethods
For more information on module installation, please visit the detailed CPAN module installation guide.