4 package CPAN::Meta::Validator;
5 our $VERSION = '2.130880'; # VERSION
8 #--------------------------------------------------------------------------#
9 # This code copied and adapted from Test::CPAN::Meta
10 # by Barbie, <barbie@cpan.org> for Miss Barbell Productions,
11 # L<http://www.missbarbell.co.uk>
12 #--------------------------------------------------------------------------#
14 #--------------------------------------------------------------------------#
15 # Specification Definitions
16 #--------------------------------------------------------------------------#
19 '1.4' => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
20 '1.3' => 'http://module-build.sourceforge.net/META-spec-v1.3.html',
21 '1.2' => 'http://module-build.sourceforge.net/META-spec-v1.2.html',
22 '1.1' => 'http://module-build.sourceforge.net/META-spec-v1.1.html',
23 '1.0' => 'http://module-build.sourceforge.net/META-spec-v1.0.html'
25 my %known_urls = map {$known_specs{$_} => $_} keys %known_specs;
27 my $module_map1 = { 'map' => { ':key' => { name => \&module, value => \&exversion } } };
29 my $module_map2 = { 'map' => { ':key' => { name => \&module, value => \&version } } };
32 'map' => { file => { list => { value => \&string } },
33 directory => { list => { value => \&string } },
34 'package' => { list => { value => \&string } },
35 namespace => { list => { value => \&string } },
36 ':key' => { name => \&custom_2, value => \&anything },
41 'map' => { file => { list => { value => \&string } },
42 directory => { list => { value => \&string } },
43 'package' => { list => { value => \&string } },
44 namespace => { list => { value => \&string } },
45 ':key' => { name => \&string, value => \&anything },
50 'map' => { file => { list => { value => \&string } },
51 dir => { list => { value => \&string } },
52 'package' => { list => { value => \&string } },
53 namespace => { list => { value => \&string } },
54 ':key' => { name => \&string, value => \&anything },
59 'map' => { ':key' => { name => \&string, list => { value => \&string } },
80 'abstract' => { mandatory => 1, value => \&string },
81 'author' => { mandatory => 1, lazylist => { value => \&string } },
82 'dynamic_config' => { mandatory => 1, value => \&boolean },
83 'generated_by' => { mandatory => 1, value => \&string },
84 'license' => { mandatory => 1, lazylist => { value => \&license } },
88 version => { mandatory => 1, value => \&version},
89 url => { value => \&url },
90 ':key' => { name => \&custom_2, value => \&anything },
93 'name' => { mandatory => 1, value => \&string },
94 'release_status' => { mandatory => 1, value => \&release_status },
95 'version' => { mandatory => 1, value => \&version },
98 'description' => { value => \&string },
99 'keywords' => { lazylist => { value => \&string } },
100 'no_index' => $no_index_2,
101 'optional_features' => {
106 description => { value => \&string },
107 prereqs => $prereq_map,
108 ':key' => { name => \&custom_2, value => \&anything },
113 'prereqs' => $prereq_map,
119 file => { mandatory => 1, value => \&file },
120 version => { value => \&version },
121 ':key' => { name => \&custom_2, value => \&anything },
128 license => { lazylist => { value => \&url } },
129 homepage => { value => \&url },
132 web => { value => \&url },
133 mailto => { value => \&string},
134 ':key' => { name => \&custom_2, value => \&anything },
139 web => { value => \&url },
140 url => { value => \&url },
141 type => { value => \&string },
142 ':key' => { name => \&custom_2, value => \&anything },
145 ':key' => { value => \&string, name => \&custom_2 },
149 # CUSTOM -- additional user defined key/value pairs
150 # note we can only validate the key name, as the structure is user defined
151 ':key' => { name => \&custom_2, value => \&anything },
158 version => { mandatory => 1, value => \&version},
159 url => { mandatory => 1, value => \&urlspec },
160 ':key' => { name => \&string, value => \&anything },
164 'name' => { mandatory => 1, value => \&string },
165 'version' => { mandatory => 1, value => \&version },
166 'abstract' => { mandatory => 1, value => \&string },
167 'author' => { mandatory => 1, list => { value => \&string } },
168 'license' => { mandatory => 1, value => \&license },
169 'generated_by' => { mandatory => 1, value => \&string },
171 'distribution_type' => { value => \&string },
172 'dynamic_config' => { value => \&boolean },
174 'requires' => $module_map1,
175 'recommends' => $module_map1,
176 'build_requires' => $module_map1,
177 'configure_requires' => $module_map1,
178 'conflicts' => $module_map2,
180 'optional_features' => {
182 ':key' => { name => \&string,
183 'map' => { description => { value => \&string },
184 requires => $module_map1,
185 recommends => $module_map1,
186 build_requires => $module_map1,
187 conflicts => $module_map2,
188 ':key' => { name => \&string, value => \&anything },
196 ':key' => { name => \&module,
198 file => { mandatory => 1, value => \&file },
199 version => { value => \&version },
200 ':key' => { name => \&string, value => \&anything },
206 'no_index' => $no_index_1_3,
207 'private' => $no_index_1_3,
209 'keywords' => { list => { value => \&string } },
212 'map' => { license => { value => \&url },
213 homepage => { value => \&url },
214 bugtracker => { value => \&url },
215 repository => { value => \&url },
216 ':key' => { value => \&string, name => \&custom_1 },
220 # additional user defined key/value pairs
221 # note we can only validate the key name, as the structure is user defined
222 ':key' => { name => \&string, value => \&anything },
229 version => { mandatory => 1, value => \&version},
230 url => { mandatory => 1, value => \&urlspec },
231 ':key' => { name => \&string, value => \&anything },
235 'name' => { mandatory => 1, value => \&string },
236 'version' => { mandatory => 1, value => \&version },
237 'abstract' => { mandatory => 1, value => \&string },
238 'author' => { mandatory => 1, list => { value => \&string } },
239 'license' => { mandatory => 1, value => \&license },
240 'generated_by' => { mandatory => 1, value => \&string },
242 'distribution_type' => { value => \&string },
243 'dynamic_config' => { value => \&boolean },
245 'requires' => $module_map1,
246 'recommends' => $module_map1,
247 'build_requires' => $module_map1,
248 'conflicts' => $module_map2,
250 'optional_features' => {
252 ':key' => { name => \&string,
253 'map' => { description => { value => \&string },
254 requires => $module_map1,
255 recommends => $module_map1,
256 build_requires => $module_map1,
257 conflicts => $module_map2,
258 ':key' => { name => \&string, value => \&anything },
266 ':key' => { name => \&module,
268 file => { mandatory => 1, value => \&file },
269 version => { value => \&version },
270 ':key' => { name => \&string, value => \&anything },
277 'no_index' => $no_index_1_3,
278 'private' => $no_index_1_3,
280 'keywords' => { list => { value => \&string } },
283 'map' => { license => { value => \&url },
284 homepage => { value => \&url },
285 bugtracker => { value => \&url },
286 repository => { value => \&url },
287 ':key' => { value => \&string, name => \&custom_1 },
291 # additional user defined key/value pairs
292 # note we can only validate the key name, as the structure is user defined
293 ':key' => { name => \&string, value => \&anything },
296 # v1.2 is misleading, it seems to assume that a number of fields where created
297 # within v1.1, when they were created within v1.2. This may have been an
298 # original mistake, and that a v1.1 was retro fitted into the timeline, when
299 # v1.2 was originally slated as v1.1. But I could be wrong ;)
304 version => { mandatory => 1, value => \&version},
305 url => { mandatory => 1, value => \&urlspec },
306 ':key' => { name => \&string, value => \&anything },
311 'name' => { mandatory => 1, value => \&string },
312 'version' => { mandatory => 1, value => \&version },
313 'license' => { mandatory => 1, value => \&license },
314 'generated_by' => { mandatory => 1, value => \&string },
315 'author' => { mandatory => 1, list => { value => \&string } },
316 'abstract' => { mandatory => 1, value => \&string },
318 'distribution_type' => { value => \&string },
319 'dynamic_config' => { value => \&boolean },
321 'keywords' => { list => { value => \&string } },
323 'private' => $no_index_1_2,
324 '$no_index' => $no_index_1_2,
326 'requires' => $module_map1,
327 'recommends' => $module_map1,
328 'build_requires' => $module_map1,
329 'conflicts' => $module_map2,
331 'optional_features' => {
333 ':key' => { name => \&string,
334 'map' => { description => { value => \&string },
335 requires => $module_map1,
336 recommends => $module_map1,
337 build_requires => $module_map1,
338 conflicts => $module_map2,
339 ':key' => { name => \&string, value => \&anything },
347 ':key' => { name => \&module,
349 file => { mandatory => 1, value => \&file },
350 version => { value => \&version },
351 ':key' => { name => \&string, value => \&anything },
358 'map' => { license => { value => \&url },
359 homepage => { value => \&url },
360 bugtracker => { value => \&url },
361 repository => { value => \&url },
362 ':key' => { value => \&string, name => \&custom_1 },
366 # additional user defined key/value pairs
367 # note we can only validate the key name, as the structure is user defined
368 ':key' => { name => \&string, value => \&anything },
371 # note that the 1.1 spec only specifies 'version' as mandatory
373 'name' => { value => \&string },
374 'version' => { mandatory => 1, value => \&version },
375 'license' => { value => \&license },
376 'generated_by' => { value => \&string },
378 'license_uri' => { value => \&url },
379 'distribution_type' => { value => \&string },
380 'dynamic_config' => { value => \&boolean },
382 'private' => $no_index_1_1,
384 'requires' => $module_map1,
385 'recommends' => $module_map1,
386 'build_requires' => $module_map1,
387 'conflicts' => $module_map2,
389 # additional user defined key/value pairs
390 # note we can only validate the key name, as the structure is user defined
391 ':key' => { name => \&string, value => \&anything },
394 # note that the 1.0 spec doesn't specify optional or mandatory fields
395 # but we will treat version as mandatory since otherwise META 1.0 is
396 # completely arbitrary and pointless
398 'name' => { value => \&string },
399 'version' => { mandatory => 1, value => \&version },
400 'license' => { value => \&license },
401 'generated_by' => { value => \&string },
403 'license_uri' => { value => \&url },
404 'distribution_type' => { value => \&string },
405 'dynamic_config' => { value => \&boolean },
407 'requires' => $module_map1,
408 'recommends' => $module_map1,
409 'build_requires' => $module_map1,
410 'conflicts' => $module_map2,
412 # additional user defined key/value pairs
413 # note we can only validate the key name, as the structure is user defined
414 ':key' => { name => \&string, value => \&anything },
418 #--------------------------------------------------------------------------#
420 #--------------------------------------------------------------------------#
424 my ($class,$data) = @_;
426 # create an attributes hash
429 'spec' => $data->{'meta-spec'}{'version'} || "1.0",
434 return bless $self, $class;
440 my $data = $self->{data};
441 my $spec_version = $self->{spec};
442 $self->check_map($definitions{$spec_version},$data);
443 return ! $self->errors;
449 return () unless(defined $self->{errors});
450 return @{$self->{errors}};
454 my $spec_error = "Missing validation action in specification. "
455 . "Must be one of 'map', 'list', 'lazylist', or 'value'";
458 my ($self,$spec,$data) = @_;
460 if(ref($spec) ne 'HASH') {
461 $self->_error( "Unknown META specification, cannot validate." );
465 if(ref($data) ne 'HASH') {
466 $self->_error( "Expected a map structure from string or file." );
470 for my $key (keys %$spec) {
471 next unless($spec->{$key}->{mandatory});
472 next if(defined $data->{$key});
473 push @{$self->{stack}}, $key;
474 $self->_error( "Missing mandatory field, '$key'" );
475 pop @{$self->{stack}};
478 for my $key (keys %$data) {
479 push @{$self->{stack}}, $key;
481 if($spec->{$key}{value}) {
482 $spec->{$key}{value}->($self,$key,$data->{$key});
483 } elsif($spec->{$key}{'map'}) {
484 $self->check_map($spec->{$key}{'map'},$data->{$key});
485 } elsif($spec->{$key}{'list'}) {
486 $self->check_list($spec->{$key}{'list'},$data->{$key});
487 } elsif($spec->{$key}{'lazylist'}) {
488 $self->check_lazylist($spec->{$key}{'lazylist'},$data->{$key});
490 $self->_error( "$spec_error for '$key'" );
493 } elsif ($spec->{':key'}) {
494 $spec->{':key'}{name}->($self,$key,$key);
495 if($spec->{':key'}{value}) {
496 $spec->{':key'}{value}->($self,$key,$data->{$key});
497 } elsif($spec->{':key'}{'map'}) {
498 $self->check_map($spec->{':key'}{'map'},$data->{$key});
499 } elsif($spec->{':key'}{'list'}) {
500 $self->check_list($spec->{':key'}{'list'},$data->{$key});
501 } elsif($spec->{':key'}{'lazylist'}) {
502 $self->check_lazylist($spec->{':key'}{'lazylist'},$data->{$key});
504 $self->_error( "$spec_error for ':key'" );
509 $self->_error( "Unknown key, '$key', found in map structure" );
511 pop @{$self->{stack}};
515 # if it's a string, make it into a list and check the list
517 my ($self,$spec,$data) = @_;
519 if ( defined $data && ! ref($data) ) {
523 $self->check_list($spec,$data);
527 my ($self,$spec,$data) = @_;
529 if(ref($data) ne 'ARRAY') {
530 $self->_error( "Expected a list structure" );
534 if(defined $spec->{mandatory}) {
535 if(!defined $data->[0]) {
536 $self->_error( "Missing entries from mandatory list" );
540 for my $value (@$data) {
541 push @{$self->{stack}}, $value || "<undef>";
542 if(defined $spec->{value}) {
543 $spec->{value}->($self,'list',$value);
544 } elsif(defined $spec->{'map'}) {
545 $self->check_map($spec->{'map'},$value);
546 } elsif(defined $spec->{'list'}) {
547 $self->check_list($spec->{'list'},$value);
548 } elsif(defined $spec->{'lazylist'}) {
549 $self->check_lazylist($spec->{'lazylist'},$value);
550 } elsif ($spec->{':key'}) {
551 $self->check_map($spec,$value);
553 $self->_error( "$spec_error associated with '$self->{stack}[-2]'" );
555 pop @{$self->{stack}};
561 my ($self,$key,$value) = @_;
563 return 1 if($value && $value =~ /^--- #YAML:1.0/);
565 $self->_error( "file does not have a valid YAML header." );
570 my ($self,$key,$value) = @_;
572 my $version = $self->{data}{version} || '';
573 if ( $version =~ /_/ ) {
574 return 1 if ( $value =~ /\A(?:testing|unstable)\z/ );
575 $self->_error( "'$value' for '$key' is invalid for version '$version'" );
578 return 1 if ( $value =~ /\A(?:stable|testing|unstable)\z/ );
579 $self->_error( "'$value' for '$key' is invalid" );
583 $self->_error( "'$key' is not defined" );
588 # _uri_split taken from URI::Split by Gisle Aas, Copyright 2003
590 return $_[0] =~ m,(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?,;
594 my ($self,$key,$value) = @_;
596 my ($scheme, $auth, $path, $query, $frag) = _uri_split($value);
597 unless ( defined $scheme && length $scheme ) {
598 $self->_error( "'$value' for '$key' does not have a URL scheme" );
601 unless ( defined $auth && length $auth ) {
602 $self->_error( "'$value' for '$key' does not have a URL authority" );
608 $self->_error( "'$value' for '$key' is not a valid URL." );
613 my ($self,$key,$value) = @_;
615 return 1 if($value && $known_specs{$self->{spec}} eq $value);
616 if($value && $known_urls{$value}) {
617 $self->_error( 'META specification URL does not match version' );
621 $self->_error( 'Unknown META specification' );
625 sub anything { return 1 }
628 my ($self,$key,$value) = @_;
630 return 1 if($value || $value =~ /^0$/);
632 $self->_error( "value is an undefined string" );
636 sub string_or_undef {
637 my ($self,$key,$value) = @_;
638 return 1 unless(defined $value);
639 return 1 if($value || $value =~ /^0$/);
640 $self->_error( "No string defined for '$key'" );
645 my ($self,$key,$value) = @_;
646 return 1 if(defined $value);
647 $self->_error( "No file defined for '$key'" );
652 my ($self,$key,$value) = @_;
653 if(defined $value && ($value || $value =~ /0/)) {
655 for(split(",",$value)) { $self->version($key,$_) or ($pass = 0); }
658 $value = '<undef>' unless(defined $value);
659 $self->_error( "'$value' for '$key' is not a valid version." );
664 my ($self,$key,$value) = @_;
666 return 0 unless($value || $value =~ /0/);
667 return 1 if($value =~ /^\s*((<|<=|>=|>|!=|==)\s*)?v?\d+((\.\d+((_|\.)\d+)?)?)/);
671 $self->_error( "'$value' for '$key' is not a valid version." );
676 my ($self,$key,$value) = @_;
678 return 1 if($value =~ /^(0|1|true|false)$/);
682 $self->_error( "'$value' for '$key' is not a boolean value." );
687 'perl' => 'http://dev.perl.org/licenses/',
688 'gpl' => 'http://www.opensource.org/licenses/gpl-license.php',
689 'apache' => 'http://apache.org/licenses/LICENSE-2.0',
690 'artistic' => 'http://opensource.org/licenses/artistic-license.php',
691 'artistic_2' => 'http://opensource.org/licenses/artistic-license-2.0.php',
692 'lgpl' => 'http://www.opensource.org/licenses/lgpl-license.php',
693 'bsd' => 'http://www.opensource.org/licenses/bsd-license.php',
694 'gpl' => 'http://www.opensource.org/licenses/gpl-license.php',
695 'mit' => 'http://opensource.org/licenses/mit-license.php',
696 'mozilla' => 'http://opensource.org/licenses/mozilla1.1.php',
697 'open_source' => undef,
698 'unrestricted' => undef,
699 'restrictive' => undef,
703 my %v2_licenses = map { $_ => 1 } qw(
734 my ($self,$key,$value) = @_;
735 my $licenses = $self->{spec} < 2 ? \%v1_licenses : \%v2_licenses;
737 return 1 if($value && exists $licenses->{$value});
741 $self->_error( "License '$value' is invalid" );
746 my ($self,$key) = @_;
748 # a valid user defined key should be alphabetic
749 # and contain at least one capital case letter.
750 return 1 if($key && $key =~ /^[_a-z]+$/i && $key =~ /[A-Z]/);
754 $self->_error( "Custom resource '$key' must be in CamelCase." );
759 my ($self,$key) = @_;
761 return 1 if($key && $key =~ /^x_/i); # user defined
765 $self->_error( "Custom key '$key' must begin with 'x_' or 'X_'." );
770 my ($self,$key) = @_;
772 return 1 if($key && $key =~ /^([a-z][_a-z]+)$/i); # spec 2.0 defined
776 $self->_error( "Key '$key' is not a legal identifier." );
781 my ($self,$key) = @_;
783 return 1 if($key && $key =~ /^[A-Za-z0-9_]+(::[A-Za-z0-9_]+)*$/);
787 $self->_error( "Key '$key' is not a legal module name." );
791 my @valid_phases = qw/ configure build test runtime develop /;
793 my ($self,$key) = @_;
795 return 1 if( length $key && grep { $key eq $_ } @valid_phases );
796 return 1 if $key =~ /x_/i;
800 $self->_error( "Key '$key' is not a legal phase." );
804 my @valid_relations = qw/ requires recommends suggests conflicts /;
806 my ($self,$key) = @_;
808 return 1 if( length $key && grep { $key eq $_ } @valid_relations );
809 return 1 if $key =~ /x_/i;
813 $self->_error( "Key '$key' is not a legal prereq relationship." );
821 $mess .= ' ('.join(' -> ',@{$self->{stack}}).')' if($self->{stack});
822 $mess .= " [Validation: $self->{spec}]";
824 push @{$self->{errors}}, $mess;
829 # ABSTRACT: validate CPAN distribution metadata structures
839 CPAN::Meta::Validator - validate CPAN distribution metadata structures
847 my $struct = decode_json_file('META.json');
849 my $cmv = CPAN::Meta::Validator->new( $struct );
851 unless ( $cmv->is_valid ) {
852 my $msg = "Invalid META structure. Errors found:\n";
853 $msg .= join( "\n", $cmv->errors );
859 This module validates a CPAN Meta structure against the version of the
860 the specification claimed in the C<meta-spec> field of the structure.
866 my $cmv = CPAN::Meta::Validator->new( $struct )
868 The constructor must be passed a metadata structure.
872 if ( $cmv->is_valid ) {
876 Returns a boolean value indicating whether the metadata provided
881 warn( join "\n", $cmv->errors );
883 Returns a list of errors seen during validation.
893 check_map($spec,$data)
895 Checks whether a map (or hash) part of the data structure conforms to the
896 appropriate specification definition.
900 check_list($spec,$data)
902 Checks whether a list (or array) part of the data structure conforms to
903 the appropriate specification definition.
907 check_lazylist($spec,$data)
909 Checks whether a list conforms, but converts strings to a single-element list
913 =head2 Validator Methods
919 header($self,$key,$value)
921 Validates that the header is valid.
923 Note: No longer used as we now read the data structure, not the file.
927 url($self,$key,$value)
929 Validates that a given value is in an acceptable URL format
933 urlspec($self,$key,$value)
935 Validates that the URL to a META specification is a known one.
939 string_or_undef($self,$key,$value)
941 Validates that the value is either a string or an undef value. Bit of a
942 catchall function for parts of the data structure that are completely user
947 string($self,$key,$value)
949 Validates that a string exists for the given key.
953 file($self,$key,$value)
955 Validate that a file is passed for the given key. This may be made more
956 thorough in the future. For now it acts like \&string.
960 exversion($self,$key,$value)
962 Validates a list of versions, e.g. '<= 5, >=2, ==3, !=4, >1, <6, 0'.
966 version($self,$key,$value)
968 Validates a single version string. Versions of the type '5.8.8' and '0.00_00'
969 are both valid. A leading 'v' like 'v1.2.3' is also valid.
973 boolean($self,$key,$value)
975 Validates for a boolean value. Currently these values are '1', '0', 'true',
976 'false', however the latter 2 may be removed.
980 license($self,$key,$value)
982 Validates that a value is given for the license. Returns 1 if an known license
983 type, or 2 if a value is given but the license type is not a recommended one.
987 custom_1($self,$key,$value)
989 Validates that the given key is in CamelCase, to indicate a user defined
990 keyword and only has characters in the class [-_a-zA-Z]. In version 1.X
991 of the spec, this was only explicitly stated for 'resources'.
995 custom_2($self,$key,$value)
997 Validates that the given key begins with 'x_' or 'X_', to indicate a user
998 defined keyword and only has characters in the class [-_a-zA-Z]
1002 identifier($self,$key,$value)
1004 Validates that key is in an acceptable format for the META specification,
1005 for an identifier, i.e. any that matches the regular expression
1010 module($self,$key,$value)
1012 Validates that a given key is in an acceptable module name format, e.g.
1013 'Test::CPAN::Meta::Version'.
1019 =for Pod::Coverage anything boolean check_lazylist check_list custom_1 custom_2 exversion file
1020 identifier license module phase relation release_status string string_or_undef
1021 url urlspec version header check_map
1025 Please report any bugs or feature using the CPAN Request Tracker.
1026 Bugs can be submitted through the web interface at
1027 L<http://rt.cpan.org/Dist/Display.html?Queue=CPAN-Meta>
1029 When submitting a bug or request, please include a test-file or a patch to an
1030 existing test-file that illustrates the bug or desired feature.
1038 David Golden <dagolden@cpan.org>
1042 Ricardo Signes <rjbs@cpan.org>
1052 Ansgar Burchardt <ansgar@cpan.org>
1056 Michael G. Schwern <mschwern@cpan.org>
1060 Randy Sims <randys@thepierianspring.org>
1064 Ævar Arnfjörð Bjarmason <avar@cpan.org>
1068 Christopher J. Madsen <cjm@cpan.org>
1072 Cory G Watson <gphat@cpan.org>
1076 Damyan Ivanov <dam@cpan.org>
1080 Eric Wilhelm <ewilhelm@cpan.org>
1084 Gregor Hermann <gregoa@debian.org>
1088 Ken Williams <kwilliams@cpan.org>
1092 Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 <daxim@cpan.org>
1096 Leon Timmermans <leont@cpan.org>
1100 Mark Fowler <markf@cpan.org>
1104 =head1 COPYRIGHT AND LICENSE
1106 This software is copyright (c) 2010 by David Golden and Ricardo Signes.
1108 This is free software; you can redistribute it and/or modify it under
1109 the same terms as the Perl 5 programming language system itself.