Dpkg::Vendor - get access to some vendor specific information
The files in $Dpkg::CONFDIR/origins/ can provide information about various vendors who are providing Debian packages. Currently those files look like this:
If the vendor derives from another vendor, the file should document the relationship by listing the base distribution in the Parent field:
The file should be named according to the vendor name. The usual convention is to name the vendor file using the vendor name in all lowercase, but some variation is permitted. Namely, spaces are mapped to dashes ('-'), and the file can have the same casing as the Vendor field, or it can be capitalized.
Returns the current dpkg origins directory name, where the vendor files are stored.
Returns a Dpkg::Control object with the information parsed from the corresponding vendor file in $Dpkg::CONFDIR/origins/. If $name is omitted, it will use $Dpkg::CONFDIR/origins/default which is supposed to be a symlink to the vendor of the currently installed operating system. Returns undef if there's no file for the given vendor.
Check if there's a file for the given vendor and returns its name.
The vendor filename will be derived from the vendor name, by replacing any number of non-alphanumeric characters (that is [^A-Za-z0-9]) into "-", then the resulting name will be tried in sequence by lower-casing it, keeping it as is, lower-casing then capitalizing it, and capitalizing it.
In addition, for historical and backwards compatibility, the name will be tried keeping it as is without non-alphanumeric characters remapping, then the resulting name will be tried in sequence by lower-casing it, keeping it as is, lower-casing then capitalizing it, and capitalizing it. And finally the name will be tried by replacing only spaces to "-", then the resulting name will be tried in sequence by lower-casing it, keeping it as is, lower-casing then capitalizing it, and capitalizing it.
But these backwards compatible name lookups will be removed during the dpkg 1.22.x release cycle.
Returns the name of the current vendor. If DEB_VENDOR is set, it uses that first, otherwise it falls back to parsing $Dpkg::CONFDIR/origins/default. If that file doesn't exist, it returns undef.
Return the Dpkg::Vendor::* object of the corresponding vendor. If $name is omitted, return the object of the current vendor. If no vendor can be identified, then return the Dpkg::Vendor::Default object.
The module name will be derived from the vendor name, by splitting parts around groups of non alphanumeric character (that is [^A-Za-z0-9]) separators, by either capitalizing or lower-casing and capitalizing each part and then joining them without the separators. So the expected casing is based on the one from the Vendor field in the origins file.
In addition, for historical and backwards compatibility, the module name will also be looked up without non-alphanumeric character stripping, by capitalizing, lower-casing then capitalizing, as-is or lower-casing. But these name lookups will be removed during the 1.22.x release cycle.
Run a hook implemented by the current vendor object.
Deprecated behavior: get_vendor_file() loading vendor files with no special characters remapping. get_vendor_object() loading vendor module names with no special character stripping.
New function: get_vendor_dir().
Mark the module as public.
To install Dpkg, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.