DBIx::Custom::Plugin::Pagerをかいた

Schemaとかかくのが面倒だけどpager機能だけ使いたいという怠惰な願望をストレートに叶えたくてかいてみた。

    use strict;
    use warnings;
    use DBIx::Custom;
    use DBIx::Custom::Plugin::Pager;
    use Try::Tiny;
    
    try {

        my $dbi      = DBIx::Custom->connect(......);
        my $results = $dbi->select_with_pager(
            table  => 'member',
            page   => 1,
            rows   => 30,
        );

        my $rows  = $results->{result}->fetch_hash_all();
        # Data::Page
        my $pager = $results->{pager};
    }
    catch {
        my $e = shift;
        Carp::confess($e); 
    };


https://github.com/hiroyukim/p5_dbix_custom_plugin_pager