---
name: "Cupt::System::State"
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::System::State"
---

# Cupt::System::State(3pm)

holds info about installed packages

## NAME

Cupt::System::State - holds info about installed packages

## METHODS

### new

creates new Cupt::System::State object, usually shouldn't be called by hand

Parameters:

*config* - reference to Cupt::Config

*cache* - reference to Cupt::Cache

### get\_status\_for\_version

method, return undef if the version isn't installed, installed info otherwise (see "get\_installed\_info")

Parameters:

*version* - reference to Cupt::Cache::BinaryVersion

### get\_installed\_info

returns installed info of the package

Parameters:

*package\_name* - package name to lookup

Returns:\
   {\
     'want' =\> *want*,\
     'flag' =\> *flag*,\
     'status' =\> *status*,\
     'version\_string' =\> *version\_string*,\
   }

if info is present, undef otherwise

### get\_installed\_version\_string

Parameters:

*package\_name* - package name to lookup

Returns:

version string of installed version or undef if no version of the package is installed

### export\_installed\_versions

method, returns array reference of installed *version*s (for those packages that have configured version in the system)

where:

*version* - reference to Cupt::Cache::BinaryVersion
