GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CPAN::Audit::Version(3) User Contributed Perl Documentation CPAN::Audit::Version(3)

CPAN::Audit::Version - the infrastructure to compare versions and version ranges

        use CPAN::Audit::Version;
        my $cav = CPAN::Audit::Version->new;
        $cav->in_range( $version, $range );

new

Create a new object. This ignores all arguments.

  • affected_versions( ARRAY_REF, RANGE )

    Given an array reference of versions, return a list of all of the versions in ARRAY_REF that are in RANGE. This is really a filter on ARRAY_REF using the values for which "in_range" returns true.

            my @matching = $cav->affected_versions( \@versions, $range );
        
  • in_range( VERSION, RANGE )

    Returns true if VERSION is contained in RANGE, and false otherwise. VERSION is any sort of Perl, such as 1.23 or 1.2.3. The RANGE is a comma-separated list of range specifications using the comparators "<", "<=", "==", ">", ">=", or "!=". For example, ">=1.23,<1.45", "==1.23", or ">1.23".

            my $version = 5.67;
            my $range = '>=5,<6'; # so, all the versions in 5.x
            if( $cav->in_range( $version, $range ) ) {
                    say "$version is within $range";
                    }
            else {
                    say "$version is not within $range";
            }
        

Copyright (C) Viacheslav Tykhanovskyi.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Viacheslav Tykhanovskyi <viacheslav.t@gmail.com>

2025-01-15 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.