info > Dpkg::Version

🏷️ NAME

Dpkg::Version – handling and comparing dpkg-style version numbers

πŸš€ Quick Reference

Use CaseCommandDescription
Create a version object$v = Dpkg::Version->new('1.2.3-1')Construct a version from a string
Check validity$v->is_valid()Returns true if version string is valid
Compare two versionsversion_compare($a, $b)Returns -1, 0, 1 (earlier, equal, later)
Compare with relationversion_compare_relation($a, REL_GT, $b)Returns 1 if $a > $b
Get epoch$v->epoch()Epoch part (e.g., 1 for β€œ1:2.3”)
Get upstream version$v->version()Version part without epoch/revision
Get revision$v->revision()Debian revision part
Check if native$v->is_native()True if no revision present
String conversion, omit epoch$v->as_string({ omit_epoch => 1 })Stringify without epoch
Suppress semantic warningno if $Dpkg::Version::VERSION ge '1.02', warnings => qw(...);Quiesce bool overload deprecation

πŸ“– DESCRIPTION

The Dpkg::Version module provides pure‑Perl routines to compare dpkg‑style version numbers (as used in Debian packages) and also an object‑oriented interface overriding perl operators to do the right thing when you compare Dpkg::Version objects between them.

πŸ”§ METHODS

βš™οΈ FUNCTIONS

All the functions are exported by default.

πŸ“ CHANGES

πŸ”– Version 1.03 (dpkg 1.20.0)

Remove deprecation warning from semantic change in 1.02.

πŸ”– Version 1.02 (dpkg 1.19.1)

Semantic change: bool evaluation semantics restored to their original behavior.

πŸ”– Version 1.01 (dpkg 1.17.0)

New argument: Accept an options argument in $v->as_string().
New method: $v->is_native().

πŸ”– Version 1.00 (dpkg 1.15.6)

Mark the module as public.

1.21.1 2025-09-09 Dpkg::Version(3perl)

Dpkg::Version
🏷️ NAME πŸš€ Quick Reference πŸ“– DESCRIPTION πŸ”§ METHODS βš™οΈ FUNCTIONS πŸ“ CHANGES
πŸ”– Version 1.03 (dpkg 1.20.0) πŸ”– Version 1.02 (dpkg 1.19.1) πŸ”– Version 1.01 (dpkg 1.17.0) πŸ”– Version 1.00 (dpkg 1.15.6)

Generated by phpman v4.9.25-3-gdbaf087 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-06 23:11 @216.73.217.93
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-pro / taotoken.net / www.chedong.com - original format

^_top_^