At
view release on metacpan or search on metacpan
# Lexicon Caching
The AT Protocol defines its API endpoints using "Lexicons" (JSON schemas). This library uses these schemas to
automatically coerce API responses into Perl objects.
## How it works
When you call a method like `app.bsky.actor.getProfile`, the library:
- 1. **Checks user-provided paths:** It looks in any directories passed to `lexicon_paths`.
- 2. **Checks local storage:** It looks for the schema in the distribution's `share` directory.
- 3. **Checks user cache:** It looks in `~/.cache/atproto/lexicons/`.
- 4. **Downloads if missing:** If not found, it automatically downloads the schema from the
official AT Protocol repository and saves it to your user cache.
This system ensures that the library can support new or updated features without requiring a new release of the Perl
module.
# METHODS
## `new( [ host =` ..., share => ... \] )>
The AT Protocol defines its API endpoints using "Lexicons" (JSON schemas). This library uses these schemas to
automatically coerce API responses into Perl objects.
=head2 How it works
When you call a method like C<app.bsky.actor.getProfile>, the library:
=over
=item 1. B<Checks user-provided paths:> It looks in any directories passed to C<lexicon_paths>.
=item 2. B<Checks local storage:> It looks for the schema in the distribution's C<share> directory.
=item 3. B<Checks user cache:> It looks in C<~/.cache/atproto/lexicons/>.
=item 4. B<Downloads if missing:> If not found, it automatically downloads the schema from the
official AT Protocol repository and saves it to your user cache.
=back
This system ensures that the library can support new or updated features without requiring a new release of the Perl
module.
=head1 METHODS
( run in 1.235 second using v1.01-cache-2.11-cpan-39bf76dae61 )