Lines Matching full:version
5 # ABSTRACT: a set of version requirements for a CPAN dist
7 our $VERSION = '2.143';
27 #pod A CPAN::Meta::Requirements object models a set of version constraints like
48 #pod * C<bad_version_hook> -- if provided, when a version cannot be parsed into
49 #pod a version object, this code reference will be called with the invalid
50 #pod version string as first argument, and the module name as second
51 #pod argument. It must return a valid version object.
71 #pod $req->add_minimum( $module => $version );
73 #pod This adds a new minimum version requirement. If the new requirement is
76 #pod Minimum requirements are inclusive. C<$version> is required, along with any
77 #pod greater version number.
83 #pod $req->add_maximum( $module => $version );
85 #pod This adds a new maximum version requirement. If the new requirement is
88 #pod Maximum requirements are inclusive. No version strictly greater than the given
89 #pod version is allowed.
95 #pod $req->add_exclusion( $module => $version );
97 #pod This adds a new excluded version. For example, you might use these three
105 #pod Any version between 1.00 and 1.82 inclusive would be acceptable, except for
112 #pod $req->exact_version( $module => $version );
114 #pod This sets the version required for the given module to I<exactly> the given
115 #pod version. No other version would be considered acceptable.
127 my ($self, $name, $version) = @_;
129 $self->__modify_entry_for($name, $method, $version);
142 my ($self, $name, $version) = @_;
144 # stringify $version so that version->new("0.00")->stringify ne "0"
146 if (not defined $version or "$version" eq '0') {
155 $self->__modify_entry_for($name, 'with_minimum', $version);
196 #pod my $bool = $req->accepts_module($module => $version);
198 #pod Given an module and version, this method returns true if the version
199 #pod specification for the module accepts the provided version. In other words,
212 my ($self, $module, $version) = @_;
215 return $range->accepts($version);
245 #pod This returns a string containing the version requirements for a given module in
264 #pod This returns a data structure containing the version requirements for a given
266 #pod not be used for version checks (see L</accepts_module> instead).
268 #pod Added in version 2.134.
307 my ($self, $name, $method, $version) = @_;
316 ->$method($version, $name, $self->{bad_version_hook});
327 #pod -- that is, if their string expression is just the version number.
412 #pod for the given module. A version can be a Perl "v-string". It understands
413 #pod version ranges as described in the L<CPAN::Meta::Spec/Version Ranges>. For
434 #pod A version number without an operator is equivalent to specifying a minimum
453 #pod object. It takes a hash of module names and version requirement
455 #pod add_string_requirement, a version can be a Perl "v-string". Optionally,
485 CPAN::Meta::Requirements - a set of version requirements for a CPAN dist
487 =head1 VERSION
489 version 2.143
507 A CPAN::Meta::Requirements object models a set of version constraints like
529 C<bad_version_hook> -- if provided, when a version cannot be parsed into a version object, this code reference will be called with the invalid version string as first argument, and the module name as second argument. It must return a valid version object.
537 $req->add_minimum( $module => $version );
539 This adds a new minimum version requirement. If the new requirement is
542 Minimum requirements are inclusive. C<$version> is required, along with any
543 greater version number.
549 $req->add_maximum( $module => $version );
551 This adds a new maximum version requirement. If the new requirement is
554 Maximum requirements are inclusive. No version strictly greater than the given
555 version is allowed.
561 $req->add_exclusion( $module => $version );
563 This adds a new excluded version. For example, you might use these three
571 Any version between 1.00 and 1.82 inclusive would be acceptable, except for
578 $req->exact_version( $module => $version );
580 This sets the version required for the given module to I<exactly> the given
581 version. No other version would be considered acceptable.
601 my $bool = $req->accepts_module($module => $version);
603 Given an module and version, this method returns true if the version
604 specification for the module accepts the provided version. In other words,
626 This returns a string containing the version requirements for a given module in
636 This returns a data structure containing the version requirements for a given
638 not be used for version checks (see L</accepts_module> instead).
640 Added in version 2.134.
657 -- that is, if their string expression is just the version number.
711 for the given module. A version can be a Perl "v-string". It understands
712 version ranges as described in the L<CPAN::Meta::Spec/Version Ranges>. For
733 A version number without an operator is equivalent to specifying a minimum
744 object. It takes a hash of module names and version requirement
746 add_string_requirement, a version can be a Perl "v-string". Optionally,