26 Oct 2000 15:40:37 UTC
- Distribution: sol-inst
- Module version: 0.9
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (2)
- KwaliteeBus factor: 0
- License: unknown
- Download (9.46KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
Solaris::InstallDB - Manages Solaris package information
use Solaris::InstallDB $instdb=Solaris::InstallDB::new(-directory => $dir, -loadContents);
The Solaris::InstallDB class manages a directory of Solaris packages. It searches for all of the packages in a directory, and then records them in a hash table by name and architecture. It is also capable of spawning a Solaris::Contents object.
With this class, you can get a list of all packages available, and all architectures it supports. It can also report some basic system about the hardware it is running on.
$instdb=Solaris::InstallDB::new(-directory => $dir, -loadContents);
The new method creates a Solaris::InstallDB object. By default, it will search for objects in the /var/sadm/pkg directory, but you can change that by using the -directory parameter.
If you want to create a Solaris::Contents object automatically, add the -loadContents flag.
Returns the operating system release number in uname format. For example, if you were running a script on a Solaris 7 system, it would return 5.7.
Returns the commercial name of the operating system. For example, if you were running a script on an Intel system running Solaris 7, it would return 7_x86.
- package(-name => $pkg, -arch => $arch, -debug)
Returns a Solaris::Package object.
If -arch isn't specified, the object will search the database for a suitable match based on the system the script is running on.
If -debug is specified and the method fails to return a package object, an error message to STDOUT will explain why the method failed.
- pkgFile(-name => $name, -arch => $arch)
Returns the filename of a particular package for the specified architecture
This object only works on packages in the directory format, not the data stream format.
The code may seem a bit complex, but it's due to the fact that there are different package directories for the same package, but with different architectures.
Since I have a lot of code that gives hardware information, I may work on the idea of a Solaris::Hardware package during a later code revision.
Chris Josephes, firstname.lastname@example.org
Module Install Instructions
To install Solaris::Package, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Solaris::Package
For more information on module installation, please visit the detailed CPAN module installation guide.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|