./PaxHeaders.31953/Data-HAL-1.0010000644000000000000000000000006213565351601012616 xustar0020 atime=1574294401 30 ctime=1574330876.892691472 Data-HAL-1.001/0000755000175100001440000000000013565351601013315 5ustar00daximusers00000000000000Data-HAL-1.001/PaxHeaders.31953/Build.PL0000644000000000000000000000006213565351601014032 xustar0020 atime=1574294401 30 ctime=1574330876.892691472 Data-HAL-1.001/Build.PL0000444000175100001440000000304513565351601014611 0ustar00daximusers00000000000000use Module::Build qw(); Module::Build->new( add_to_cleanup => [ 'Data-HAL-*' ], build_requires => { 'Data::Visitor::Callback' => 0, 'File::Slurp' => 0, 'JSON' => 0, 'Log::Any::Adapter' => 0, 'Log::Any::Adapter::FileHandle' => 0, 'strictures' => 0, 'Test::Fatal' => 0, 'Test::More' => 0, }, configure_requires => { 'Module::Build' => 0.40, }, dist_version_from => 'lib/Data/HAL.pm', dynamic_config => 0, license => 'perl', meta-spec => { url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', version => '1.4', }, module_name => 'Data::HAL', no_index => { file => [ 'lib/Data/HAL/URI/NamespaceMap.pm', ], }, requires => { 'boolean' => 0, 'Clone' => 0, 'Data::Visitor::Callback' => 0, 'failures' => 0, 'HTTP::Headers::Util' => 0, 'JSON' => 0, 'Log::Any' => 0, 'MIME::Type' => 0, 'Moo' => 0, 'perl' => '5.008', 'Safe::Isa' => 0, 'Scalar::Util' => 0, 'strictures' => 0, 'Types::Standard' => 0, 'URI' => 0, 'URI::IRI' => 0, 'URI::NamespaceMap' => '<= 0.12', 'URI::Template' => 0, 'XML::RegExp' => 0, }, resources => { license => 'http://dev.perl.org/licenses/', bugtracker => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Data-HAL', repository => 'https://github.com/daxim/Data-HAL', }, )->create_build_script; Data-HAL-1.001/PaxHeaders.31953/Changes0000644000000000000000000000006213565351601014031 xustar0020 atime=1574294401 30 ctime=1574330876.892691472 Data-HAL-1.001/Changes0000444000175100001440000000023713565351601014610 0ustar00daximusers00000000000000=encoding UTF-8 =head1 NAME Changes - Revision history for Data-HAL =head2 1.001 2019-11-21 restrict dependency =head2 1.000 2013-10-15 Initial release. Data-HAL-1.001/PaxHeaders.31953/MANIFEST0000644000000000000000000000006213565351601013667 xustar0020 atime=1574294401 30 ctime=1574330876.892691472 Data-HAL-1.001/MANIFEST0000444000175100001440000000132713565351601014447 0ustar00daximusers00000000000000Build.PL Changes lib/Data/HAL.pm lib/Data/HAL/Link.pm lib/Data/HAL/URI.pm lib/Data/HAL/URI/NamespaceMap.pm MANIFEST This list of files META.json META.yml README t/00.load.t t/curies.t t/deprecation.t t/double.t t/example.json t/example1.json t/example2.json t/example3.json t/example4.json t/exampleWithArray.json t/exampleWithLiteralNullProperty.json t/exampleWithMultipleNestedSubresources.json t/exampleWithMultipleSubresources.json t/exampleWithNullProperty.json t/exampleWithoutHref.json t/exampleWithSubresource.json t/exampleWithSubresourceLinkingToItself.json t/exampleWithTemplate.json t/exampleWithUnderscoredProperty.json t/headers.t t/invalid.t t/profile.t t/round-trip.t SIGNATURE Added here by Module::Build Data-HAL-1.001/PaxHeaders.31953/META.json0000644000000000000000000000006213565351601014157 xustar0020 atime=1574294401 30 ctime=1574330876.892691472 Data-HAL-1.001/META.json0000444000175100001440000000350513565351601014737 0ustar00daximusers00000000000000{ "abstract" : "Hypertext Application Language resource", "author" : [ "Lars Dɪᴇᴄᴋᴏᴡ C<< >>" ], "dynamic_config" : 0, "generated_by" : "Module::Build version 0.4229", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Data-HAL", "no_index" : { "file" : [ "lib/Data/HAL/URI/NamespaceMap.pm" ] }, "prereqs" : { "build" : { "requires" : { "Data::Visitor::Callback" : "0", "File::Slurp" : "0", "JSON" : "0", "Log::Any::Adapter" : "0", "Log::Any::Adapter::FileHandle" : "0", "Test::Fatal" : "0", "Test::More" : "0", "strictures" : "0" } }, "configure" : { "requires" : { "Module::Build" : "0.4" } }, "runtime" : { "requires" : { "Clone" : "0", "Data::Visitor::Callback" : "0", "HTTP::Headers::Util" : "0", "JSON" : "0", "Log::Any" : "0", "MIME::Type" : "0", "Moo" : "0", "Safe::Isa" : "0", "Scalar::Util" : "0", "Types::Standard" : "0", "URI" : "0", "URI::IRI" : "0", "URI::NamespaceMap" : "<= 0.12", "URI::Template" : "0", "XML::RegExp" : "0", "boolean" : "0", "failures" : "0", "perl" : "5.008", "strictures" : "0" } } }, "release_status" : "stable", "resources" : { "license" : [ "http://dev.perl.org/licenses/" ] }, "version" : "1.001", "x_serialization_backend" : "JSON::PP version 4.02" } Data-HAL-1.001/PaxHeaders.31953/META.yml0000644000000000000000000000006213565351601014007 xustar0020 atime=1574294401 30 ctime=1574330876.892691472 Data-HAL-1.001/META.yml0000444000175100001440000000217513565351601014571 0ustar00daximusers00000000000000--- abstract: 'Hypertext Application Language resource' author: - "Lars Dɪá´\x87á´\x84á´\x8Bá´\x8Fá´¡ C<< >>" build_requires: Data::Visitor::Callback: '0' File::Slurp: '0' JSON: '0' Log::Any::Adapter: '0' Log::Any::Adapter::FileHandle: '0' Test::Fatal: '0' Test::More: '0' strictures: '0' configure_requires: Module::Build: '0.4' dynamic_config: 0 generated_by: 'Module::Build version 0.4229, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Data-HAL no_index: file: - lib/Data/HAL/URI/NamespaceMap.pm requires: Clone: '0' Data::Visitor::Callback: '0' HTTP::Headers::Util: '0' JSON: '0' Log::Any: '0' MIME::Type: '0' Moo: '0' Safe::Isa: '0' Scalar::Util: '0' Types::Standard: '0' URI: '0' URI::IRI: '0' URI::NamespaceMap: '<= 0.12' URI::Template: '0' XML::RegExp: '0' boolean: '0' failures: '0' perl: '5.008' strictures: '0' resources: license: http://dev.perl.org/licenses/ version: '1.001' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' Data-HAL-1.001/PaxHeaders.31953/README0000644000000000000000000000006213565351601013416 xustar0020 atime=1574294401 30 ctime=1574330876.892691472 Data-HAL-1.001/README0000444000175100001440000000140613565351601014174 0ustar00daximusers00000000000000=encoding UTF-8 Data-HAL version 1.001 is Copyright © 2013-2019, Lars Dɪᴇᴄᴋᴏᴡ =head1 NAME README - basic information for users prior to downloading =head1 INSTALLATION See L, L, L. =head1 LICENCE AND COPYRIGHT Copyright © 2013-2019 Lars Dɪᴇᴄᴋᴏᴡ C<< >> This library is free software; you can redistribute it and/or modify it under the same terms as Perl 5.18.0. =head2 Disclaimer of warranty This library is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness Data-HAL-1.001/PaxHeaders.31953/lib0000644000000000000000000000006213565351601013227 xustar0020 atime=1574294401 30 ctime=1574330876.892691472 Data-HAL-1.001/lib/0000755000175100001440000000000013565351601014063 5ustar00daximusers00000000000000Data-HAL-1.001/lib/PaxHeaders.31953/Data0000644000000000000000000000006213565351601014100 xustar0020 atime=1574294401 30 ctime=1574330876.892691472 Data-HAL-1.001/lib/Data/0000755000175100001440000000000013565351601014734 5ustar00daximusers00000000000000Data-HAL-1.001/lib/Data/PaxHeaders.31953/HAL.pm0000644000000000000000000000006213565351601015117 xustar0020 atime=1574294401 30 ctime=1574330876.892691472 Data-HAL-1.001/lib/Data/HAL.pm0000444000175100001440000003000413565351601015671 0ustar00daximusers00000000000000package Data::HAL; use strictures; use boolean qw(false true); use Clone qw(clone); use Data::HAL::Link qw(); use Data::HAL::URI qw(); use Data::HAL::URI::NamespaceMap qw(); use Data::Visitor::Callback qw(); use failures qw(Data::HAL::InvalidJSON); use HTTP::Headers::Util qw(join_header_words); use JSON qw(); use Moo; # has use Safe::Isa qw($_isa); use Scalar::Util qw(reftype); use Types::Standard qw(ArrayRef Bool HashRef InstanceOf Str); our $VERSION = '1.001'; my $uri_from_str = sub { my ($val) = @_; return $val->$_isa('Data::HAL::URI') ? $val : Data::HAL::URI->new($val); }; has('embedded', is => 'rw', isa => ArrayRef[InstanceOf['Data::HAL']]); has('links', is => 'rw', isa => ArrayRef[InstanceOf['Data::HAL::Link']]); has('resource', is => 'rw', isa => HashRef, default => sub {return {};}); has('relation', is => 'rw', isa => InstanceOf['Data::HAL::URI'], coerce => $uri_from_str); has('_nsmap', is => 'rw', isa => InstanceOf['Data::HAL::URI::NamespaceMap']); has('_recursing', is => 'ro', isa => Bool); sub BUILD { my ($self) = @_; $self->_expand_curies unless $self->_recursing; return; } sub from_json { my ($self, $json, $relation) = @_; my $nested = clone JSON::from_json($json); failure::Data::HAL::InvalidJSON->throw('not a JSON object') unless reftype $nested eq reftype {}; return $self->_from_nested($self->_boolify($nested), $relation)->_expand_curies; } sub _boolify { my ($self, $nested) = @_; my $visited = Data::Visitor::Callback->new( object => sub { my (undef, $val) = @_; if (JSON::is_bool($val)) { $val = false if $val == JSON::false; $val = true if $val == JSON::true; } return $val; } )->visit($nested); return $visited; } sub _from_nested { my ($class, $nested, $relation, $_recursing) = @_; my $embedded = delete $nested->{_embedded}; my $links = delete $nested->{_links}; my $self = $class->new( $relation ? (relation => $relation) : (), resource => $nested, $_recursing ? (_recursing => $_recursing) : (), ); if ($embedded) { $self->embedded([]); for my $k (keys %{ $embedded }) { push @{ $self->embedded }, (reftype $embedded->{$k} eq reftype []) ? map { $self->_from_nested($_, $k, 1) } @{ $embedded->{$k} } : $self->_from_nested($embedded->{$k}, $k, 1); } } if ($links) { $self->links([]); for my $k (keys %{ $links }) { push @{ $self->links }, (reftype $links->{$k} eq reftype []) ? map { Data::HAL::Link->new(%{ $_ }, relation => $k) } @{ $links->{$k} } : Data::HAL::Link->new(%{ $links->{$k} }, relation => $k); } } return $self; } sub _expand_curies { my ($self) = @_; my $nsmap = Data::HAL::URI::NamespaceMap->new; if ($self->links) { for my $l (@{ $self->links }) { if ('curies' eq $l->relation->as_string) { $nsmap->add_mapping($l->name, $l->href); } } } $self->_nsmap($nsmap); $self->_recurse_curies($self); return $self; } sub _recurse_curies { my ($self, $root) = @_; if ($self->relation) { my $uri = $root->_nsmap->uri($self->relation->as_string); if ($uri) { $self->relation(Data::HAL::URI->new( uri => $uri->uri, _original => $self->relation->_original, )); } } if ($self->links) { for my $l (@{ $self->links }) { my $uri = $root->_nsmap->uri($l->relation->as_string($root)); next unless $uri; $l->relation(Data::HAL::URI->new( uri => $uri->uri, _original => $l->relation->_original, )); } } if ($self->embedded) { for my $e (@{ $self->embedded }) { $e->_recurse_curies($root); } } return $self; } sub _to_nested { my ($self, $root) = @_; if ($self->relation) { $self->relation(Data::HAL::URI->new( uri => URI->new($self->relation->_original), _original => $self->relation->_original, )); } my $hal = clone $self->resource; for my $prop (qw(links embedded)) { if ($self->$prop) { for my $p (@{ $self->$prop }) { my ($nested, $r) = $p->_to_nested($root); if (exists $hal->{"_$prop"}{$r}) { if (reftype $hal->{"_$prop"}{$r} eq reftype []) { push @{ $hal->{"_$prop"}{$r} }, $nested; } else { my $attr = delete $hal->{"_$prop"}{$r}; push @{ $hal->{"_$prop"}{$r} }, $attr, $nested; } } else { $hal->{"_$prop"}{$r} = $nested; } } } } return($hal, $self->relation ? $self->relation->as_string : ()); } sub TO_JSON { my ($self) = @_; my ($nested) = $self->_to_nested($self); my $visited = Data::Visitor::Callback->new( boolean => sub { my (undef, $val) = @_; return $val ? JSON::true : JSON::false; } )->visit($nested); return $visited; } sub as_json { my ($self) = @_; return JSON::to_json($self->TO_JSON, { canonical => 1, pretty => 1, utf8 => 1 }); } sub http_headers { my ($self) = @_; my @headers; if ($self->links) { if (my ($profile_link) = grep { 'profile' eq $_->relation->as_string } @{ $self->links }) { push @headers, 'Content-Type' => join_header_words( 'application/hal+json' => undef, profile => $profile_link->href->as_string ); } else { push @headers, 'Content-Type' => 'application/hal+json'; } push @headers, map { (Link => $_->as_http_link_value) } grep { 'curies' ne $_->relation->as_string } @{ $self->links }; } return @headers; } 1; __END__ =encoding UTF-8 =head1 NAME Data::HAL - Hypertext Application Language resource =head1 VERSION This document describes Data::HAL version 1.001 =head1 SYNOPSIS use Data::HAL qw(); use Data::HAL::Link qw(); { my $hal = Data::HAL->from_json($json_str); my $resource_member_data_href = $hal->resource; my $links_aref = $hal->links; my $embedded_resources_aref = $hal->embedded; } { my $hal = Data::HAL->new( resource => {foo => 23, bar => 42}, links => [Data::HAL::Link->new(relation => 'self', href => '/')], ); my $json_str = $hal->as_json; # { # "_links" : { # "self" : { # "href" : "/" # } # }, # "bar" : 42, # "foo" : 23 # } my @headers = $hal->http_headers; # ( # 'Content-Type' => 'application/hal+json', # 'Link' => ';rel="self"' # ) } =head1 DESCRIPTION HAL is a format you can use in your hypermedia API. =head2 Introduction This section is completely quoted from the specification: There is an emergence of non-HTML HTTP applications ("Web APIs") which use hyperlinks to direct clients around their resources. The JSON Hypertext Application Language (HAL) is a standard which establishes conventions for expressing hypermedia controls, such as links, with JSON. HAL is a generic media type with which Web APIs can be developed and exposed as series of links. Clients of these APIs can select links by their link relation type and traverse them in order to progress through the application. HAL's conventions result in a uniform interface for serving and consuming hypermedia, enabling the creation of general-purpose libraries that can be re-used on any API utilising HAL. The primary design goals of HAL are generality and simplicity. HAL can be applied to many different domains, and imposes the minimal amount of structure necessary to cover the key requirements of a hypermedia Web API. =head2 Conformance The author claims to conform with L, published 2013-10-03. =head1 INTERFACE =head2 Composition None. =head2 Constructors =head3 C Data::HAL->from_json($json_str) Takes a HAL+JSON document as string and returns a C object. =head3 C Data::HAL->new( resource => {foo => 23, bar => 42}, links => [Data::HAL::Link->new(relation => 'self', href => '/')] ) Default L constructor, returns a C object. =head2 Attributes =head3 C Type C, L<< embedded resource objects|http://tools.ietf.org/html/draft-kelly-json-hal#section-4.1.2 >> =head3 C Type C, L<< link objects|http://tools.ietf.org/html/draft-kelly-json-hal#section-4.1.1 >> =head3 C Type C, member data L<< representing the current state of the resource|http://tools.ietf.org/html/draft-kelly-json-hal#section-4 >> =head3 C Type L, L<< identifier of the semantics of a link|http://tools.ietf.org/html/rfc5988#section-4 >> Perl strings are coerced to the L type. A stand-alone HAL+JSON document, when deserialised, will not have this attribute set in the root resource since nothing is linking to the document. =head2 Methods =head3 C Serialisation hook for the L (or compatible) module. This method is not intended to be called directly from your code. Instead call L or C<< JSON::to_json $hal, { convert_blessed => 1 } >> or similar. =head3 C Returns the resource object serialised as a HAL+JSON document string. =head3 C Returns a list of pairs of HTTP message headers. The keys are field name strings and the values are field content strings. B: since field names can repeat, assigning this list to a hash loses information. The list is suitable as input for e.g. the L<< C accessor in HTTP::Headers|HTTP::Headers/$h->header( $f1 => $v1, $f2 => $v2, ... ) >> or the L<< C attribute in Plack::Response|Plack::Response/headers >>. =head4 C The value is C, perhaps with a C parameter. =head4 C See L. =head2 Exports None. =head1 DIAGNOSTICS =head2 C The L constructor throws this exception of type C when the JSON input is a malformed HAL+JSON document. =head1 CONFIGURATION AND ENVIRONMENT Requires no configuration files or environment variables. =head1 DEPENDENCIES See meta file in the source distribution. =head1 INCOMPATIBILITIES None reported. =head1 BUGS AND LIMITATIONS Please report any bugs or feature requests to C, or through the web interface at L. =head2 tight coupling to JSON It is currently difficult to exert control over the specifics of (de)serialisation, perhaps put the (de)serialisers into attributes? =head2 error type is an attribute, not a class name It is not worth it to design an error class hierarchy for a single error. =head2 Data::HAL::URI::NamespaceMap is undocumented It is used only internally. =head1 TO DO =over =item make everything cache-friendly =item non-standard accessors for link objects =item support §8.3. cache pattern =item support HAL XML =back =head1 SEE ALSO L, the more mature, featureful hypermedia protocol =head1 AUTHOR Lars Dɪᴇᴄᴋᴏᴡ C<< >> =head1 LICENCE AND COPYRIGHT Copyright © 2013-2019 Lars Dɪᴇᴄᴋᴏᴡ C<< >> This library is free software; you can redistribute it and/or modify it under the same terms as Perl 5.18.0. =head2 Disclaimer of warranty This library is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. Data-HAL-1.001/lib/Data/PaxHeaders.31953/HAL0000644000000000000000000000006213565351601014504 xustar0020 atime=1574294401 30 ctime=1574330876.892691472 Data-HAL-1.001/lib/Data/HAL/0000755000175100001440000000000013565351601015340 5ustar00daximusers00000000000000Data-HAL-1.001/lib/Data/HAL/PaxHeaders.31953/Link.pm0000644000000000000000000000006213565351601016014 xustar0020 atime=1574294401 30 ctime=1574330876.892691472 Data-HAL-1.001/lib/Data/HAL/Link.pm0000444000175100001440000001222713565351601016575 0ustar00daximusers00000000000000package Data::HAL::Link; use strictures; use boolean qw(false true); use Data::HAL::URI qw(); use HTTP::Headers::Util qw(join_header_words); use JSON qw(); use Log::Any qw($log); use MIME::Type qw(); use Moo; # has use Safe::Isa qw($_can $_isa); use Types::Standard qw(InstanceOf Str); our $VERSION = '1.001'; my $uri_from_str = sub { my ($val) = @_; return $val->$_isa('Data::HAL::URI') ? $val : Data::HAL::URI->new($val); }; my $boolean_from_perlbool = sub { my ($val) = @_; return $val ? true : false; }; has('relation', is => 'rw', isa => InstanceOf['Data::HAL::URI'], coerce => $uri_from_str, required => 1); has('href', is => 'rw', isa => InstanceOf['Data::HAL::URI'], coerce => $uri_from_str, required => 1); has('templated', is => 'rw', isa => InstanceOf['boolean'], coerce => $boolean_from_perlbool); has('type', is => 'rw', isa => InstanceOf['MIME::Type']); has('deprecation', is => 'rw', isa => InstanceOf['Data::HAL::URI'], coerce => $uri_from_str); has('name', is => 'rw', isa => Str); has('profile', is => 'rw', isa => InstanceOf['Data::HAL::URI'], coerce => $uri_from_str); has('title', is => 'rw', isa => Str); has('hreflang', is => 'rw', isa => Str); sub BUILD { my ($self) = @_; if ($self->deprecation) { $log->warn(sprintf 'The link (relation: "%s", href: "%s") is deprecated, see <%s>', $self->relation->as_string, $self->href->as_string, $self->deprecation->as_string); } return; } sub _to_nested { my ($self, $root) = @_; my $hal; for my $attr (map { $_->accessor } $self->meta->get_all_attributes) { my $val = $self->$attr; if (defined $val) { $hal->{$attr} = $val->$_can('as_string') ? $val->as_string($root) : $val; } } my $r = delete $hal->{relation}; return($hal, $r); } sub as_http_link_value { my ($self) = @_; return if 'curies' eq $self->relation->as_string; return join_header_words( '<'.$self->href->as_string.'>' => undef, rel => $self->relation->as_string, $self->hreflang ? (hreflang => $self->hreflang) : (), $self->title ? (title => $self->title) : (), $self->type ? (type => $self->type) : (), $self->name ? (name => $self->name) : (), $self->profile ? (profile => $self->profile->as_string) : (), ); } 1; __END__ =encoding UTF-8 =head1 NAME Data::HAL::Link - Hypertext Application Language link =head1 VERSION This document describes Data::HAL::Link version 1.001 =head1 SYNOPSIS map { +{ href => $_->href->uri->as_string, rel => $_->relation->uri->as_string } } @{ $resource->links } =head1 DESCRIPTION This section is completely quoted from the specification: A Link Object represents a hyperlink from the containing resource to a URI. =head1 INTERFACE =head2 Composition None. =head2 Constructors =head3 C When the L attribute is set, the constructor logs a L warning: C<< The link (relation: "%s", href: "%s") is deprecated, see <%s> >> You can consume it with a L of your choice, e.g. use Log::Any::Adapter 'Stderr'; Otherwise the constructor behaves like the default L constructor. Returns a C object. =head2 Attributes Perl strings are coerced to the L type in the attributes L, L, L, L. =head3 C Type L, B, L =head3 C Type L, B, L =head3 C Type L, L<< whether C is a URI template|http://tools.ietf.org/html/draft-kelly-json-hal#section-5.2 >> Perl boolean values are coerced to the L type. =head3 C Type L, L<< media type of the C resource|http://tools.ietf.org/html/draft-kelly-json-hal#section-5.3 >> =head3 C Type L, if existing L<< indicates the link is deprecated|http://tools.ietf.org/html/draft-kelly-json-hal#section-5.4 >> Setting the attribute triggers a log message in the constructor L. =head3 C Type C, L<< secondary key for selecting link objects which share the same relation type|http://tools.ietf.org/html/draft-kelly-json-hal#section-5.5 >> =head3 C Type L, L<< RFC 6906 profile of the target resource|http://tools.ietf.org/html/draft-kelly-json-hal#section-5.6 >> =head3 C Type C<Str>, L<< labels the link with a human-readable identifier|http://tools.ietf.org/html/draft-kelly-json-hal#section-5.7 >> =head3 C<hreflang> Type C<Str>, L<< indicates the language of the target resource|http://tools.ietf.org/html/draft-kelly-json-hal#section-5.8 >> =head2 Methods =head3 C<as_http_link_value> Returns the link as a L<< RFC 5988 C<link-value>|http://tools.ietf.org/html/rfc5988#section-5 >> string, e.g. C<< </orders?page=2>;rel="next" >>. =head2 Exports None. =head1 DIAGNOSTICS See L</new> constructor. =head1 CONFIGURATION AND ENVIRONMENT Requires no configuration files or environment variables. �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/lib/Data/HAL/PaxHeaders.31953/URI.pm�������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�015556� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/lib/Data/HAL/URI.pm������������������������������������������������������������������0000444�0001751�0000144�00000004332�13565351601�016335� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������package Data::HAL::URI; use strictures; use Moo; # has use Types::Standard qw(InstanceOf Str); use URI qw(); our $VERSION = '1.001'; has('_original', is => 'rw', isa => Str); # just records what was passed to the constructor, this is a work-around for # URI->new being a lossy operation has( 'uri', is => 'ro', isa => InstanceOf['URI'], default => sub { my ($self) = @_; return URI->new($self->_original); }, handles => [qw(abs as_iri canonical clone eq fragment implementor new_abs opaque path rel scheme secure STORABLE_freeze STORABLE_thaw)], lazy => 1, required => 1, ); sub BUILDARGS { my (undef, @arg) = @_; return 1 == @arg ? {_original => $arg[0]} : {@arg}; } sub as_string { my ($self, $root) = @_; if ( $self->eq($self->_original) || $root && $root->_nsmap && $self->uri->eq($root->_nsmap->uri($self->_original)->as_string) ) { return $self->_original; } else { return $self->uri->as_string; } } 1; __END__ =encoding UTF-8 =head1 NAME Data::HAL::URI - URI wrapper =head1 VERSION This document describes Data::HAL::URI version 1.001 =head1 SYNOPSIS my $relation = $resource->relation->as_string; =head1 DESCRIPTION This is a wrapper for L<URI> objects. =head1 INTERFACE =head2 Composition None, but L<URI> methods are delegated through the L</uri> attribute. =head2 Constructors =head3 C<new> my $u = Data::HAL::URI->new('http://example.com/something'); Takes a string argument, returns a C<Data::HAL::URI> object. =head2 Attributes =head3 C<uri> Type C<URI>, B<required>, B<readonly>, can only be set from the L</new> constructor. This attribute delegates all methods to L<URI> except L</as_string>. =head2 Methods =head3 C<as_string> Returns the original argument to the constructor if still equal to the L</uri>, where equality also takes CURIE expansion into account, or otherwise the L</uri> as string. The unaltered behaviour is still available through the L</uri> accessor, e.g.: $resource->relation->uri->as_string =head2 Exports None. =head1 DIAGNOSTICS None. =head1 CONFIGURATION AND ENVIRONMENT Requires no configuration files or environment variables. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/lib/Data/HAL/PaxHeaders.31953/URI����������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�015143� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/lib/Data/HAL/URI/��������������������������������������������������������������������0000755�0001751�0000144�00000000000�13565351601�015777� 5����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/lib/Data/HAL/URI/PaxHeaders.31953/NamespaceMap.pm������������������������������������0000644�0000000�0000000�00000000062�13565351601�020110� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/lib/Data/HAL/URI/NamespaceMap.pm�����������������������������������������������������0000444�0001751�0000144�00000001303�13565351601�020662� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������package Data::HAL::URI::NamespaceMap; use strictures; use Data::HAL::URI qw(); use Moo; # extends use URI::IRI qw(); use URI::Template qw(); use XML::RegExp qw(); extends 'URI::NamespaceMap'; our $VERSION = '1.001'; sub uri { my ($self, $abbr) = @_; if (my ($prefix, $reference) = $abbr =~ m/\A ($XML::RegExp::NCName) : (.*) \z/msx) { if ($self->namespace_uri($prefix)) { return Data::HAL::URI->new( _original => $abbr, uri => URI::Template ->new($self->namespace_uri($prefix)->as_string) ->process(rel => URI::IRI->new($reference)->canonical->as_string), ); } } return; } 1; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/PaxHeaders.31953/t�������������������������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�012724� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/�����������������������������������������������������������������������������������0000755�0001751�0000144�00000000000�13565351601�013560� 5����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/00.load.t���������������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�014323� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/00.load.t��������������������������������������������������������������������������0000444�0001751�0000144�00000000427�13565351601�015103� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������use strictures; use Test::More import => [qw(diag done_testing use_ok)]; BEGIN { use_ok('Data::HAL'); use_ok('Data::HAL::Link'); use_ok('Data::HAL::URI'); use_ok('Data::HAL::URI::NamespaceMap'); } diag('Testing Data::HAL ' . Data::HAL->VERSION); done_testing; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/curies.t����������������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�014460� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/curies.t���������������������������������������������������������������������������0000444�0001751�0000144�00000001351�13565351601�015235� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������use strictures; use Test::More import => [qw(done_testing is ok)]; use Data::HAL qw(); use File::Slurp qw(read_file); my $hal = Data::HAL->from_json(scalar read_file 't/exampleWithMultipleNestedSubresources.json'); my @expanded_curies = map { $_->relation->uri->as_string } @{ $hal->links }; ok grep { 'https://example.com/apidocs/ns/parent' eq $_ } @expanded_curies; ok grep { 'https://example.com/apidocs/ns/users' eq $_ } @expanded_curies; is $hal->embedded->[0]->relation->uri->as_string, 'https://example.com/apidocs/ns/user'; is $hal->embedded->[1]->relation->uri->as_string, 'https://example.com/apidocs/ns/user'; is $hal->embedded->[0]->embedded->[0]->relation->uri->as_string, 'https://example.com/apidocs/phone/cell'; done_testing; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/deprecation.t�����������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�015463� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/deprecation.t����������������������������������������������������������������������0000444�0001751�0000144�00000000752�13565351601�016244� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������use strictures; use Data::HAL qw(); use File::Slurp qw(read_file); use Log::Any::Adapter qw(); use Log::Any::Adapter::FileHandle qw(); use Test::More import => [qw(done_testing is)]; my $log; open my $fh, '>', \$log; Log::Any::Adapter->set('FileHandle', fh => $fh); Data::HAL->from_json(scalar read_file 't/example3.json'); is $log, qq{[warning] The link (relation: "widgets", href: "/widgets") } . "is deprecated, see <http://example.com/blog/2013/09/no-more-widgets>\n"; done_testing; ����������������������Data-HAL-1.001/t/PaxHeaders.31953/double.t����������������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�014440� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/double.t���������������������������������������������������������������������������0000444�0001751�0000144�00000000417�13565351601�015217� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������use strictures; use Test::More import => [qw(done_testing is)]; use Data::HAL qw(); use File::Slurp qw(read_file); my $hal = Data::HAL->from_json(scalar read_file 't/example.json'); my $json1 = $hal->as_json; my $json2 = $hal->as_json; is $json2, $json1; done_testing; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/example.json������������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�015327� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/example.json�����������������������������������������������������������������������0000444�0001751�0000144�00000001270�13565351601�016104� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "_links" : { "curies" : [ { "href" : "https://example.com/apidocs/ns/{rel}", "name" : "ns", "templated" : true }, { "href" : "https://example.com/apidocs/role/{rel}", "name" : "role", "templated" : true } ], "self" : { "href" : "https://example.com/api/customer/123456" }, "ns:parent" : { "href" : "https://example.com/api/customer/1234", "name" : "bob", "title" : "The Parent", "hreflang" : "en" }, "ns:users" : { "href" : "https://example.com/api/customer/123456?users" } }, "age" : 33, "expired" : false, "id" : 123456, "name" : "Example Resource", "optional" : true } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/example1.json�����������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�015410� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/example1.json����������������������������������������������������������������������0000444�0001751�0000144�00000002103�13565351601�016161� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "_links": { "self": { "href": "/orders" }, "next": { "href": "/orders?page=2" }, "find": { "href": "/orders{?id}", "templated": true }, "admin": [{ "href": "/admins/2", "title": "Fred" }, { "href": "/admins/5", "title": "Kate" }] }, "currentlyProcessing": 14, "shippedToday": 20, "_embedded": { "order": [{ "_links": { "self": { "href": "/orders/123" }, "basket": { "href": "/baskets/98712" }, "customer": { "href": "/customers/7809" } }, "total": 30.00, "currency": "USD", "status": "shipped" }, { "_links": { "self": { "href": "/orders/124" }, "basket": { "href": "/baskets/97213" }, "customer": { "href": "/customers/12369" } }, "total": 20.00, "currency": "USD", "status": "processing" }] } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/example2.json�����������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�015411� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/example2.json����������������������������������������������������������������������0000444�0001751�0000144�00000000407�13565351601�016167� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "_links": { "self": { "href": "/orders" }, "curies": [{ "name": "acme", "href": "http://docs.acme.com/relations/{rel}", "templated": true }], "acme:widgets": { "href": "/widgets" } } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/example3.json�����������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�015412� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/example3.json����������������������������������������������������������������������0000444�0001751�0000144�00000000255�13565351601�016171� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "_links": { "self": { "href": "/orders" }, "widgets": { "href": "/widgets", "deprecation": "http://example.com/blog/2013/09/no-more-widgets" } } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/example4.json�����������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�015413� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/example4.json����������������������������������������������������������������������0000444�0001751�0000144�00000000210�13565351601�016161� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "_links": { "self": { "href": "/orders" }, "profile": { "href": "http://example.com/shop/documentation" } } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/exampleWithArray.json���������������������������������������������0000644�0000000�0000000�00000000062�13565351601�017162� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/exampleWithArray.json��������������������������������������������������������������0000444�0001751�0000144�00000000111�13565351601�017730� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "array" : [ "one", "two", "three" ], "name" : "Example Resource" } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/exampleWithLiteralNullProperty.json�������������������������������0000644�0000000�0000000�00000000062�13565351601�022100� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/exampleWithLiteralNullProperty.json������������������������������������������������0000444�0001751�0000144�00000001316�13565351601�022656� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "_links" : { "curies" : [ { "href" : "https://example.com/apidocs/ns/{rel}", "name" : "ns", "templated" : true }, { "href" : "https://example.com/apidocs/role/{rel}", "name" : "role", "templated" : true } ], "self" : { "href" : "https://example.com/api/customer/123456" }, "ns:parent" : { "href" : "https://example.com/api/customer/1234", "name" : "bob", "title" : "The Parent", "hreflang" : "en" }, "ns:users" : { "href" : "https://example.com/api/customer/123456?users" } }, "age" : 33, "expired" : false, "id" : 123456, "name" : "Example Resource", "nullval" : "null", "optional" : true } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/exampleWithMultipleNestedSubresources.json������������������������0000644�0000000�0000000�00000000062�13565351601�023447� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/exampleWithMultipleNestedSubresources.json�����������������������������������������0000444�0001751�0000144�00000002662�13565351601�024232� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "_links" : { "curies" : [ { "href" : "https://example.com/apidocs/ns/{rel}", "name" : "ns", "templated" : true }, { "href" : "https://example.com/apidocs/phone/{rel}", "name" : "phone", "templated" : true }, { "href" : "https://example.com/apidocs/role/{rel}", "name" : "role", "templated" : true } ], "self" : { "href" : "https://example.com/api/customer/123456" }, "ns:parent" : { "href" : "https://example.com/api/customer/1234", "name" : "bob", "title" : "The Parent", "hreflang" : "en" }, "ns:users" : { "href" : "https://example.com/api/customer/123456?users" } }, "_embedded" : { "ns:user" : [ { "_links" : { "self" : { "href" : "https://example.com/user/11" } }, "age" : 32, "expired" : false, "id" : 11, "name" : "Example User", "optional" : true, "_embedded" : { "phone:cell" : { "_links" : { "self" : { "href" : "https://example.com/phone/1" } }, "id" : 1, "number" : "555-666-7890" } } }, { "_links" : { "self" : { "href" : "https://example.com/user/12" } }, "age" : 32, "expired" : false, "id" : 12, "name" : "Example User", "optional" : true } ] } } ������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/exampleWithMultipleSubresources.json������������������������������0000644�0000000�0000000�00000000062�13565351601�022304� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/exampleWithMultipleSubresources.json�����������������������������������������������0000444�0001751�0000144�00000002106�13565351601�023060� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "_links" : { "curies" : [ { "href" : "https://example.com/apidocs/ns/{rel}", "name" : "ns", "templated" : true }, { "href" : "https://example.com/apidocs/role/{rel}", "name" : "role", "templated" : true } ], "self" : { "href" : "https://example.com/api/customer/123456" }, "ns:parent" : { "href" : "https://example.com/api/customer/1234", "name" : "bob", "title" : "The Parent", "hreflang" : "en" }, "ns:users" : { "href" : "https://example.com/api/customer/123456?users" } }, "_embedded" : { "ns:user" : [ { "_links" : { "self" : { "href" : "https://example.com/user/11" } }, "age" : 32, "expired" : false, "id" : 11, "name" : "Example User", "optional" : true }, { "_links" : { "self" : { "href" : "https://example.com/user/12" } }, "age" : 32, "expired" : false, "id" : 12, "name" : "Example User", "optional" : true } ] } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/exampleWithNullProperty.json��������������������������������������0000644�0000000�0000000�00000000062�13565351601�020563� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/exampleWithNullProperty.json�������������������������������������������������������0000444�0001751�0000144�00000001315�13565351601�021340� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "_links" : { "curies" : [ { "href" : "https://example.com/apidocs/ns/{rel}", "name" : "ns", "templated" : true }, { "href" : "https://example.com/apidocs/role/{rel}", "name" : "role", "templated" : true } ], "self" : { "href" : "https://example.com/api/customer/123456" }, "ns:parent" : { "href" : "https://example.com/api/customer/1234", "name" : "bob", "title" : "The Parent", "hreflang" : "en" }, "ns:users" : { "href" : "https://example.com/api/customer/123456?users" } }, "age" : 33, "expired" : false, "id" : 123456, "name" : "Example Resource", "nullprop" : null, "optional" : true } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/exampleWithSubresource.json���������������������������������������0000644�0000000�0000000�00000000062�13565351601�020405� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/exampleWithSubresource.json��������������������������������������������������������0000444�0001751�0000144�00000001534�13565351601�021165� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "_links" : { "curies" : [ { "href" : "https://example.com/apidocs/ns/{rel}", "name" : "ns", "templated" : true }, { "href" : "https://example.com/apidocs/role/{rel}", "name" : "role", "templated" : true } ], "self" : { "href" : "https://example.com/api/customer/123456" }, "ns:parent" : { "href" : "https://example.com/api/customer/1234", "name" : "bob", "title" : "The Parent", "hreflang" : "en" }, "ns:users" : { "href" : "https://example.com/api/customer/123456?users" } }, "_embedded" : { "ns:user" : { "_links" : { "self" : { "href" : "https://example.com/user/11" } }, "age" : 32, "expired" : false, "id" : 11, "name" : "Example User", "optional" : true } } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/exampleWithSubresourceLinkingToItself.json������������������������0000644�0000000�0000000�00000000062�13565351601�023373� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/exampleWithSubresourceLinkingToItself.json�����������������������������������������0000444�0001751�0000144�00000001661�13565351601�024154� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "_links" : { "curies" : [ { "href" : "https://example.com/apidocs/ns/{rel}", "name" : "ns", "templated" : true }, { "href" : "https://example.com/apidocs/role/{rel}", "name" : "role", "templated" : true } ], "self" : { "href" : "https://example.com/api/customer/123456" }, "ns:parent" : { "href" : "https://example.com/api/customer/1234", "name" : "bob", "title" : "The Parent", "hreflang" : "en" }, "ns:users" : { "href" : "https://example.com/api/customer/123456?users" } }, "_embedded" : { "ns:user" : { "_links" : { "self" : { "href" : "https://example.com/user/11" }, "role:admin" : { "href" : "https://example.com/user/11" } }, "age" : 32, "expired" : false, "id" : 11, "name" : "Example User", "optional" : true } } } �������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/exampleWithTemplate.json������������������������������������������0000644�0000000�0000000�00000000062�13565351601�017657� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/exampleWithTemplate.json�����������������������������������������������������������0000444�0001751�0000144�00000001152�13565351601�020433� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "_links" : { "curies" : [ { "href" : "https://example.com/apidocs/ns/{rel}", "name" : "ns", "templated" : true }, { "href" : "https://example.com/apidocs/role/{rel}", "name" : "role", "templated" : true } ], "self" : { "href" : "https://example.com/api/customer" }, "ns:parent" : { "href" : "https://example.com/api/customer/1234", "name" : "bob", "title" : "The Parent", "hreflang" : "en" }, "ns:query" : { "href" : "https://example.com/api/customer/search{?queryParam}", "templated" : true } } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/exampleWithUnderscoredProperty.json�������������������������������0000644�0000000�0000000�00000000062�13565351601�022126� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/exampleWithUnderscoredProperty.json������������������������������������������������0000444�0001751�0000144�00000000205�13565351601�022700� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "_links" : { "self" : { "href" : "https://example.com/api/customer/123456" } }, "_name" : "Example Resource" } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/exampleWithoutHref.json�������������������������������������������0000644�0000000�0000000�00000000062�13565351601�017520� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/exampleWithoutHref.json������������������������������������������������������������0000444�0001751�0000144�00000000042�13565351601�020271� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "name" : "Example Resource" } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/headers.t���������������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�014601� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/headers.t��������������������������������������������������������������������������0000444�0001751�0000144�00000001732�13565351601�015361� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������use strictures; use Test::More import => [qw(done_testing is_deeply)]; use Data::HAL qw(); my $hal = Data::HAL->new( links => [ Data::HAL::Link->new(relation => 'self', href => 'http://example.com/a-resource'), Data::HAL::Link->new(relation => 'profile', href => 'http://example.com/docs'), Data::HAL::Link->new(relation => 'curies', name => 'example', href => 'http://example.com/rel#{rel}', templated => 1), Data::HAL::Link->new(relation => 'example:foo', href => '/a-foo-thing'), Data::HAL::Link->new(relation => 'example:bar', href => '/some-bar'), ], ); is_deeply [$hal->http_headers], [ 'Content-Type' => 'application/hal+json; profile="http://example.com/docs"', 'Link' => '<http://example.com/a-resource>; rel=self', 'Link' => '<http://example.com/docs>; rel=profile', 'Link' => '</a-foo-thing>; rel="http://example.com/rel#foo"', 'Link' => '</some-bar>; rel="http://example.com/rel#bar"', ]; done_testing; ��������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/invalid.t���������������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�014614� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/invalid.t��������������������������������������������������������������������������0000444�0001751�0000144�00000000332�13565351601�015367� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������use strictures; use Data::HAL qw(); use Test::Fatal qw(exception); use Test::More import => [qw(done_testing isa_ok)]; isa_ok exception { Data::HAL->from_json('[]') }, 'failure::Data::HAL::InvalidJSON'; done_testing; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/profile.t���������������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�014626� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/profile.t��������������������������������������������������������������������������0000444�0001751�0000144�00000000454�13565351601�015406� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������use strictures; use Data::HAL qw(); use File::Slurp qw(read_file); use Test::More import => [qw(done_testing is)]; is {Data::HAL->from_json(scalar read_file 't/example4.json')->http_headers}->{'Content-Type'}, 'application/hal+json; profile="http://example.com/shop/documentation"'; done_testing; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/PaxHeaders.31953/round-trip.t������������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�015271� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/t/round-trip.t�����������������������������������������������������������������������0000444�0001751�0000144�00000001344�13565351601�016050� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������use strictures; use Test::More import => [qw(done_testing is_deeply)]; use Data::HAL qw(); use Data::Visitor::Callback qw(); use File::Slurp qw(read_file); use JSON qw(); sub round_trip { my ($file_name, $json_in) = @_; my $json_out = Data::HAL->from_json($json_in)->as_json; my $in_unwrapped = Data::Visitor::Callback->new( array => sub { if (1 == @{ $_ }) { my ($inner) = @{ $_ }; return $inner; } return $_; } )->visit(JSON::from_json($json_in)); is_deeply JSON::from_json($json_out), $in_unwrapped, $file_name; } for my $file_name (sort glob 't/*.json') { round_trip($file_name, scalar read_file $file_name); } done_testing; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/PaxHeaders.31953/SIGNATURE�����������������������������������������������������������0000644�0000000�0000000�00000000062�13565351601�014022� x����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������20 atime=1574294401 30 ctime=1574330876.892691472 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Data-HAL-1.001/SIGNATURE����������������������������������������������������������������������������0000644�0001751�0000144�00000010472�13565351601�014605� 0����������������������������������������������������������������������������������������������������ustar�00daxim���������������������������users���������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.83. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: % cpansign -v It will check each file's integrity, as well as the signature's validity. If "==> Signature verified OK! <==" is not displayed, the distribution may already have been compromised, and you should not run its Makefile.PL or Build.PL. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 SHA256 38275fa2a7c6d4a8a0cd827d9bc745fa9d3c1e909bab01bc01c471fb9fbe3664 Build.PL SHA256 3e3cbe793128f134930626724e5c44b41a73ec3f108fd0c200e01084715053d9 Changes SHA256 96899b156fe829c8aa465634292ea3ee9550383424e107e08e6e950a37982e9e MANIFEST SHA256 540da1f34a90abc216c47af7722577514705c135aa3f7f755a6da91d1b768faa META.json SHA256 4f5188ce8672a6b28a4242699c7aa664aab71b76c4d3624574de9286adece06a META.yml SHA256 a747e55e7bbdadac27f50336cd72ae3b13161c57d8ab82bbeada8be66f02facc README SHA256 37c83f1acfac009134a2eec2e91fb58792250c4b123c5a109d852837b908f5f5 lib/Data/HAL.pm SHA256 634ed335ea5eb45c09758c3533dad9c2415b07ac9a1ad0cf8e112b8c3f2c252b lib/Data/HAL/Link.pm SHA256 e8e14a51dc761569c1793a66de12ba2038f1ee9e7030d28c1091769faf7496f1 lib/Data/HAL/URI.pm SHA256 357adb73f535f6797e0c35da56e17d2ec21aa9946ef09ced2a5899512b527583 lib/Data/HAL/URI/NamespaceMap.pm SHA256 1283f268ca99b9b019355d380561ee7d95067dc135b09cb162e9063d454a63c5 t/00.load.t SHA256 6d492287f15bb18018449754c97800e50c395efb2d8e36f48a17eec6f6cd504f t/curies.t SHA256 7e95e740271fa73266362773429c3b553af81c68114ad495bb26ab4928fb6aa7 t/deprecation.t SHA256 3d9938fdcbac42348fff2ab545ff25c2f44dd2522029d4ba7e1c19049ea465c2 t/double.t SHA256 ed187c4841fd9ec6de9c6d606685b3c1d76333183fbdc6c024cb9188a8b52bfb t/example.json SHA256 749976adda41cfa0bfff3a4dc75902068b0bf8a650d1a2b6456d79e81ba29a05 t/example1.json SHA256 3bd37b39ed34166c8f8878905126dc1d85d829f79c4c0ef5f87f6653cc096915 t/example2.json SHA256 64f8bc515f67c6ecb2434b00f030655e5c10d7ee9e8b6ca7cfbb7735a11155f9 t/example3.json SHA256 90f34da49dd1db0af03edd179fb4631f6e18f304fc5e85aae2d607948995eb10 t/example4.json SHA256 aa513c9023c0350167e16e8a8a6c10bbae23825d3455b03bcefbdc2dad5fab88 t/exampleWithArray.json SHA256 cef8b1293dc58b5086d891b907c59866500bc019cbc5dd530966a6768fd9c6c4 t/exampleWithLiteralNullProperty.json SHA256 d3c281d898e246767f6a72c463b7e9423b9830ad921ade13257fce7b83c9ac73 t/exampleWithMultipleNestedSubresources.json SHA256 a4e72977dfdfe5b92bba237b0a7b9df15d754d36625d7b4f097644a20494b479 t/exampleWithMultipleSubresources.json SHA256 a0ff70d2ceb888d0c00933cac5bf55a322d9f5f6061fe3bbaa957bf7c7d63a5d t/exampleWithNullProperty.json SHA256 f80056a397117a10554fa80af0bd732f7b6ea77d8fda8f155224570526b0788a t/exampleWithSubresource.json SHA256 99ed4e6e5453c939e5eaca4a42eec0d179f0cc59399df149236cd62340c1d474 t/exampleWithSubresourceLinkingToItself.json SHA256 682f9c69bae311dce732dae8316fb10919f444d565e384472ed7451b1c8d2353 t/exampleWithTemplate.json SHA256 05f99f38eac92f70f065743bc1c4dcca566f0890c4bdfd7d507a7a9525e58ac9 t/exampleWithUnderscoredProperty.json SHA256 e4cf90744aad8cdc5e041ce2b31c20341884a888af9f00c130e8a2e1c270535a t/exampleWithoutHref.json SHA256 50e7abc26e655f880fb8ea2f9306942fedf20c391abd0fa1aca865f15dfe0c55 t/headers.t SHA256 132ebc88f33d36402b5300c7206a3d36dc563f67517c0b1986cc0ab93d616378 t/invalid.t SHA256 8826074189be65ae3557ee8c232fdc2e9f9799e5ba6f316465be041fd4b72bf0 t/profile.t SHA256 0b94511e096dbe89a6d6d3b5d98921c383785a9be1180ab1b52327639ed980b6 t/round-trip.t -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEMyq1FG5k9SFemJXi7lkEJKTE1yAFAl3WYYMACgkQ7lkEJKTE 1yCpoA/+JyCZO7M0Sx46t44ahQD81nGRFae8XV5G7111Q65NFfqHbuNBE8k2nyg8 N1DWggzxH9ZDR2LBmEenp7wVzlXXnPj+1hRzSwUI6mAYhpf+8pVrabYcfjNqW4en dn2JoxjcY1lPmAmsVfJ1bQLX+oxsiOQhng7SaohIJE5VyAnCkHztEe8nsQYfKLAa pkJ8uKzoe3Ev0n6CW/tQ4ytqHZgUzjyS2TZE5MPzT3yRlT1jy4X8qS7RhtMyKXFF q6Ga4I/0OL8tclBqEIIS7tyrXFwH38wGkTHFT9iCi9dIwwrahkTD0u3JMFZJB+ps 6V4PE1S1OHjShWDPZT3h5w9ErkVAQUvOiqQ3+K12B9YIWCS4/0eKNNjZxRF9sIRA kDGG96tNugysxcLvCYPW4L0FHJ3no51IqKs+7FifuQZhp8Oqia3szvaCy6uE0Q3i CU95DVYilqAvZdXg3UygHGSWtY8OdT0y9K1yzL4vwPmq2xdtBfXOBllDVWEkb2Sn 6+JAu8b4KM/PehTaW6j0iZq9L+KIEd21aI6LPGnlhqOyExODeKBFfZxIEL4kMnGy 8GeVK3EylanFkrpilk559j6++EqCMoZnuoBAzP2ywJXxU5VGIqDzcb8GLZAh4MwY 3CrtGyGiVynJ/pZMpYoFZKUoMbDhf/IAPTq+be8PK9KEQPXEuzE= =Fe2V -----END PGP SIGNATURE----- ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������