NAME

Azure::SDK::Core::Page - one page of a list operation

SYNOPSIS

my $page = Azure::SDK::Core::Page->new(
    items              => \@results,
    continuation_token => $token,
);

while ( $page->has_more ) {
    $page = $fetch->( $page->continuation_token );
}

DESCRIPTION

The service-agnostic half of a paged response: the items on this page and the token needed to request the next one. Service libraries subclass this to add whatever metadata their list API echoes back, as Azure::SDK::Storage::Blobs::BlobPage does with the container name and prefix.

This lives in Core rather than in a service library because every comparison SDK treats paging as a core concept: .NET has Page<T> and Pageable<T> in Azure.Core, Python has ItemPaged in azure-core, and Rust has Pager<T> in azure_core. Keeping it here means the second service to add a list operation inherits the behavior instead of restating it.

Continuation tokens

Tokens are opaque and must be round-tripped exactly as received. Do not parse, truncate, or infer meaning from them; the format differs between Azure and the emulators, and between services.

CONSTRUCTOR

new

Named parameters: items (array reference, defaults to empty) and continuation_token. An empty-string token is normalized to undef.

METHODS

items

The array reference of items on this page.

continuation_token

The opaque token for the next page, or undef on the last page.

has_more

True when another page is available.

count

The number of items on this page.

SEE ALSO

Azure::SDK::Storage::Blobs::BlobPage