06 Dec 2021 20:23:10 UTC
- Distribution: Dpkg
- Module version: 1.01
- Source (raw)
- Browse (raw)
- How to Contribute
- Repository (git clone)
- Testers (34 / 0 / 39)
- KwaliteeBus factor: 1
- License: gpl_2
- Perl: v5.28.1
- Activity24 month
- Download (522.16KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
Dpkg::Changelog::Entry - represents a changelog entry
This class represents a changelog entry. It is composed of a set of lines with specific purpose: a header line, changes lines, a trailer line. Blank lines can be between those kind of lines.
- $entry = Dpkg::Changelog::Entry->new()
Creates a new object. It doesn't represent a real changelog entry until one has been successfully parsed or built from scratch.
- $str = $entry->output()
Get a string representation of the changelog entry.
Print the string representation of the changelog entry to a filehandle.
Return either a string (for a single line) or an array ref (for multiple lines) corresponding to the requested part. $part can be "header, "changes", "trailer", "blank_after_header", "blank_after_changes", "blank_after_trailer".
- $entry->set_part($part, $value)
Set the value of the corresponding part. $value can be a string or an array ref.
- $entry->extend_part($part, $value)
Concatenate $value at the end of the part. If the part is already a multi-line value, $value is added as a new line otherwise it's concatenated at the end of the current line.
- $is_empty = $entry->is_empty()
Returns 1 if the changelog entry doesn't contain anything at all. Returns 0 as soon as it contains something in any of its non-blank parts.
Normalize the content. Strip whitespaces at end of lines, use a single empty line to separate each part.
- $src = $entry->get_source()
Return the name of the source package associated to the changelog entry.
- $ver = $entry->get_version()
Return the version associated to the changelog entry.
- @dists = $entry->get_distributions()
Return a list of target distributions for this version.
- $fields = $entry->get_optional_fields()
Return a set of optional fields exposed by the changelog entry. It always returns a Dpkg::Control object (possibly empty though).
- $urgency = $entry->get_urgency()
Return the urgency of the associated upload.
- $maint = $entry->get_maintainer()
Return the string identifying the person who signed this changelog entry.
- $time = $entry->get_timestamp()
Return the timestamp of the changelog entry.
- $time = $entry->get_timepiece()
Return the timestamp of the changelog entry as a Time::Piece object.
This function might return undef if there was no timestamp.
- $str = $entry->get_dpkg_changes()
Returns a string that is suitable for usage in a
Changesfield in the output format of
New method: $entry->get_timepiece().
Mark the module as public.