The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Amazon::Sites - A class to represent Amazon sites

SYNOPSIS

  use Amazon::Sites;

  my $sites = Amazon::Sites->new;
  my @sites = $sites->sites;
  my %sites = $sites->sites_hash;
  my @codes = $sites->codes;

  my $site  = $sites->site('UK');
  say $site->currency; # GBP
  say $site->tldr;     # co.uk
  # etc

DESCRIPTION

A simple class that encapsulates information about Amazon sites.

METHODS

new

Creates a new Amazon::Sites object.

sites_hash

Returns a hash where the keys are the two-letter country codes and the values are Amazon::Site objects.

site($code)

Given a two-letter country code, returns the corresponding Amazon::Site object.

sites

Returns a list of Amazon::Site objects, sorted by the sort order.

codes

Returns a list of the two-letter country codes, sorted by the sort order.