NAME
Amazon::API::Paginator::Compiler - compile Botocore paginator metadata
SYNOPSIS
my $compiler = Amazon::API::Paginator::Compiler->new(
operations => $operations,
shapes => $shapes,
);
my $compiled_paginators = $compiler->compile($paginators);
DESCRIPTION
Amazon::API::Paginator::Compiler converts the raw Botocore paginators-1.json representation into the normalized paginator metadata used by Amazon::API at runtime.
The compiler is intentionally strict. It validates paginator fields, token cardinality, request members, selector syntax, selector paths, and result shape types. Unsupported Botocore constructs fail during service generation rather than being deferred to an API invocation.
The compiled metadata contains operation-keyed paginator definitions using these fields:
- tokens
-
An ordered list of request token names and response selector expressions.
- results
-
Result selector paths grouped by aggregation verb:
append,add,concat, orfirst. - continuation
-
An optional selector expression for explicit continuation. If absent, continuation is token-driven.
- limit
-
An optional request member containing the per-page limit.
- preserve
-
Optional response selector paths whose first-page values are retained in the aggregate result.
METHODS
new
my $compiler = Amazon::API::Paginator::Compiler->new(
operations => $operations,
shapes => $shapes,
);
Both operations and shapes are required Botocore service metadata hash references.
compile
my $compiled_paginators = $compiler->compile($paginators);
Compiles a raw Botocore paginator metadata object. Services without paginator metadata return an empty hash reference.
AUTHOR
See the Amazon::API distribution.