---
name: "DPKG::Log::Entry"
section: "3pm"
platform: "linux"
package: "libdpkg-log-perl"
version: "1.20-2"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/DPKG::Log::Entry"
---

# DPKG::Log::Entry(3pm)

Describe a log entry in a dpkg.log

## NAME

DPKG::Log::Entry - Describe a log entry in a dpkg.log

## VERSION

version 1.20

## SYNOPSIS

use DPKG::Log::Entry;

`$dpkg_log_entry` = DPKG::Log::Entry-\>new( line =\> `$line`, `$lineno` =\> 1)

`$dpkg_log_entry`-\>timestamp($dt);

`$dpkg_log_entry`-\>associated\_package("foo");

## DESCRIPTION

This module is used to describe one line in a dpkg log by parameterizing every line into generic parameters like

- •

  Type of log entry (startup-, status-, action-lines)

- •

  Timestamp

- •

  Subject of log entry (e.g. package, packages or archives)

- •

  Package name (if log entry refers to a package subject)

and so on.

The various parameters are described below together with the various methods to access or modify them.

## METHODS

- $dpkg\_log\_entry = PACKAGE-\>new( 'line' =\> $line, 'lineno' =\> $lineno )

  Returns a new DPKG::Log::Entry object. The arguments **line** and **lineno** are mandatore. They store the complete line as stored in the log and the line number.

  Additionally its possible to specify every attribute the object can store, as 'key' =\> 'value' pairs.

## ATTRIBUTES

- $dpkg\_log\_entry-\>*line()* / line

  Return the full log line. This attribute is set on object initialization.

- $dpkg\_log\_entry-\>*lineno()* / lineno

  Return the line number of this entry. This attribute is set on object initialization.

- $dpkg\_log\_entry-\>*timestamp()* / timestamp

  Get or set the timestamp of this object. Should be a DateTime object.

- $dpkg\_log\_entry-\>*type()* / type

  Get or set the type of this entry. Specifies weither this is a startup, status or action line.

- $dpkg\_log\_entry-\>*associated\_package()* / associated\_package

  Get or set the associated\_package of this entry. This is for lines that are associated to a certain package like in action or status lines. Its usually unset for startup and status lines.

- $dpkg\_log\_entry-\>*action()* / action

  Get or set the action of this entry. This is for lines that have a certain action, like in startup-lines (unpack, configure) or action lines (install, remove). It is usally unset for status lines.

- $dpkg\_log\_entry-\>*status()* / status

  Get or set the status of the package this entry refers to.

- $dpkg\_log\_entry-\>*subject()* / subject

  Gets or Defines the subject of the entry. For startup lines this is usually 'archives' or 'packages' for all other lines its 'package'.

- $dpkg\_log\_entry-\>*installed\_version()* / installed\_version

  Gets or Defines the installed\_version of the package this entry refers to. It refers to the current installed version of the package depending on the current status. Is "\<none\>" (or similar) if action is 'install', old version in case of an upgrade.

- $dpkg\_log\_entry-\>*available\_version()* / available\_version

  Gets or Defines the available\_version of the package this entry refers to. It refers to the currently available version of the package depending on the current status. Is different from installed\_version if the action is install or upgrade.

- $dpkg\_log\_entry-\>*conffile()* / conffile

  Get or set a conffile for a line indicating a conffile change.

- $dpkg\_log\_entry-\>*decision()* / decision

  Gets or defines the decision for a line indicating a conffile change.

## SEE ALSO

DateTime

## AUTHOR

Patrick Schoenfeld \<schoenfeld@debian.org\>.

## COPYRIGHT AND LICENSE

Copyright (C) 2011 Patrick Schoenfeld \<schoenfeld@debian.org\>

This library is free software. You can redistribute it and/or modify it under the same terms as perl itself.
