+*version_cmp = \&version_cmp_pp;
+eval {
+ require AptPkg::Config;
+ require AptPkg::System;
+ require AptPkg::Version;
+
+ $AptPkg::Config::_config->init;
+ $AptPkg::System::_system = $AptPkg::Config::_config->system;
+ my $apt_ver = $AptPkg::System::_system->versioning;
+ *version_cmp = sub { return $apt_ver->compare(@_) };
+};
+