Cupt::Cache::Package(3) store versions of binary or source deb package

FLAGS

o_memoize

This flag determines whether it worth cacheing parsed versions. Off by default. If it's on, it stores references, so don't modify results of these functions, use them in read-only mode. If it's on, these functions are not thread-safe.

METHODS

new

returns a new Cupt::Cache::Package object. Usually shouldn't be called by hand.

add_entry

method, adds unparsed entry to package. Usually should't be called by hand.

get_versions

method, returns reference to array of versions (Cupt::Cache::BinaryVersion or Cupt::Cache::SourceVersion) that this package contains

get_specific_version

method, returns reference to Cupt::Cache::BinaryVersion or Cupt::Cache::SourceVersion (depending on the value of the object), which has specific version string, or undef if such version isn't found

Parameters:

version_string - version string to search

compare_versions

free subroutine, compares two versions by version number

Parameters:

first_version - reference to Cupt::Cache::BinaryVersion or Cupt::Cache::SourceVersion

second_verson - reference to Cupt::Cache::BinaryVersion or Cupt::Cache::SourceVersion

Returns:

the same as Cupt::Core::compare_version_strings

get_installed_version

method, returns reference to Cupt::Cache::BinaryVersion which is installed in the system; if package is not installed, returns undef