Author image Michal Josef Špaček

NAME

Java::Release::Obj - Data object for Java::Release.

SYNOPSIS

 use Java::Release::Obj;

 my $obj = Java::Release::Obj->new(%params);
 my $arch = $obj->arch
 my $interim = $obj->interim;
 my $os = $obj->os;
 my $patch = $obj->patch;
 my $release = $obj->release;
 my $update = $obj->update;
 my $version = $obj->version($type);
 my $version_name = $obj->version_name;

METHODS

constructor

 my $obj = Java::Release::Obj->new(%params);

Constructor.

Returns instance of object.

  • arch

    Architecture.

    Parameter is required.

  • interim

    Interim version number.

    Parameter is optional.

    Default values is undef.

  • os

    Operating system.

    Parameter is required.

  • patch

    Patch version number.

    Parameter is optional.

    Default values is undef.

  • release

    Release version number.

    Parameter is required.

  • update

    Update version number.

    Parameter is optional.

    Default values is undef.

arch

 my $arch = $obj->arch

Get architecture.

Returns string.

interim

 my $interim = $obj->interim;

Get interim version number.

Returns integer.

os

 my $os = $obj->os;

Get operating system.

Returns string.

patch

 my $patch = $obj->patch;

Get patch version number.

Returns integer.

release

 my $release = $obj->release;

Get release version number.

Returns integer.

update

 my $update = $obj->update;

Get update version number.

Returns integer.

version

 my $version = $obj->version($type);

Get version of release in short notation. There are two possibilities for $type: 'new' (12.0.3) and 'old' (12u3) string.

Returns string.

version_name

 my $version_name = $obj->version_name;

Get version of release in character notation. There are two possibilities to write: new and old version.

Returns string.

ERRORS

 version():
         Bad version type. Possible values are 'new' or 'old'.
                 type: %s
         Cannot create old version of version with interim or patch value.

EXAMPLE

 use strict;
 use warnings;

 use Data::Printer;
 use Java::Release::Obj;

 my $obj = Java::Release::Obj->new(
         arch => 'i386',
         os => 'linux',
         release => 1,
 );

 p $obj;

 # Output like:
 # Java::Release::Obj  {
 #     Parents       Mo::Object
 #     public methods (0)
 #     private methods (0)
 #     internals: {
 #         arch      "i386",
 #         os        "linux",
 #         release   1
 #     }
 # }

DEPENDENCIES

Error::Pure, List::MoreUtils, Mo.

REPOSITORY

https://github.com/michal-josef-spacek/Java-Release

AUTHOR

Michal Josef Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

© 2020-2021 Michal Josef Špaček

BSD 2-Clause License

VERSION

0.06