DBIx::Custom::Order - Order by clause
# Result my $order = DBIx::Custom::Order->new; $order->prepend('title', 'author desc'); my $order_by = "$order";
my $dbi = $order->dbi; $order = $order->dbi($dbi);
DBIx::Custom object.
my $orders = $result->orders; $result = $result->orders(\%orders);
Parts of order by clause
DBIx::Custom::Result inherits all methods from Object::Simple and implements the following new ones.
$order->prepend('title', 'author desc');
Prepend order parts to orders.
orders
my $order_by = $order->to_string;
Create order by clause. If column name is duplicated, First one is used. to_string override stringification. so you can write the following way.
to_string
my $order_by = "$order";
To install DBIx::Custom, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Custom
CPAN shell
perl -MCPAN -e shell install DBIx::Custom
For more information on module installation, please visit the detailed CPAN module installation guide.