---
name: "Cupt::Cache::Package"
section: "3pm"
platform: "linux"
package: "libcupt-perl"
version: "1.5.14.1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/Cupt::Cache::Package"
---

# Cupt::Cache::Package(3pm)

store versions of binary or source deb package

## NAME

Cupt::Cache::Package - 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
