File: vers-tool

package info (click to toggle)
liburi-packageurl-perl 2.22-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 276 kB
  • sloc: perl: 1,447; sh: 45; makefile: 2
file content (78 lines) | stat: -rw-r--r-- 1,725 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/perl

use strict;
use warnings;
use utf8;

use URI::VersionRange::App;

exit URI::VersionRange::App->run(@ARGV) unless caller();

1;

__END__
=encoding utf-8

=head1 NAME

vers-tool - Version Range tool

=head1 SYNOPSIS

    vers-tool [OPTIONS]...STRING
    vers-tool STRING --contains STRING
    vers-tool [--help|--man|-v]

    Options:
          --help                    Brief help message
          --man                     Full documentation
          -v                        Print version

          --contains=VERSION        Check if a version is contained within a range

          --format=FORMAT           Output format
          --json                    JSON output format (--format=json)
      -h, --human-readable          Human-readable format (--format=human-readable)

    Examples:

    Decode a "vers" string:

        vers-tool "vers:cpan/1.00|>=2.00|<5.00" | jq

    Check if a version is contained within a range:

        vers-tool "vers:cpan/1.00|>=2.00|<5.00" --contains "2.20"

    Humanize "vers":

        vers-tool "vers:cpan/1.00|>=2.00|<5.00" --human-readable

=head1 DESCRIPTION

C<vers-tool> Version Range tool

=head1 EXAMPLES

Decode a "vers" string:

    vers-tool "vers:cpan/1.00|>=2.00|<5.00" | jq

Check if a version is contained within a range:

    vers-tool "vers:cpan/1.00|>=2.00|<5.00" --contains "2.20"

Humanize "vers":

    vers-tool "vers:cpan/1.00|>=2.00|<5.00" --human-readable

=head1 AUTHOR

L<Giuseppe Di Terlizzi|https://metacpan.org/author/gdt>

=head1 COPYRIGHT AND LICENSE

Copyright © 2022-2024 L<Giuseppe Di Terlizzi|https://metacpan.org/author/gdt>

You may use and distribute this module according to the same terms
that Perl is distributed under.