The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

add_item()

 my %object_data = (
    'SOURCE' => '/source/file1',
    'TYPE' => 'file',
    'KIND' => 'doc',
    'DESTINATION' => '/usr/local/file1',
    'USER' => 'joe',
    'GROUP' => 'staff',
    'MODE' => 0750,
    );
 $packager->add_item(%object_data);

This method overrides the add_item method in Software::Packager. It adds the ability to add extra features used by RPM for each object in the package.

For more details see the documentation in: Software::Packager Software::Packager::Object::Rpm

program_name()

 $packager->program_name('SoftwarePackager');
 my $program_name = $packager->program_name();

This method is used to set the name of the program that the package is installing. This may in should be the same as the package name but that is not required. It must not contain spaces or a dash "-" and must be all on one line.

version()

 $packager->version(1.2.3.4.5.6);
 my $version = $packager->version();

This method sets the version for the package to the passed value. The version passed cannot contain a dash "-" or spaces and must be on one line.

release()

This method sets the release version for the package. The release is the number of times the package has been recreated. If the release is not set then a default of 1 is used. It cannot contain spaces, a dash or new lines.

copyright()

This method sets the copyright type for the package. This should be the name of the copyright

source()

This method sets the source location for the package. This should be the URL for the source package used to create this package.

architecture()

 $packager->architecture("sparc");
 my $arch = $packager->architecture();

This method sets the architecture for the package to the passed value. If no argument is passed then the current architecture is returned. This is the output "from uname -p"

package_name()

 my $name = $packager->package_name();
 

This method returns the name of the package that will be created.

short_description()

 $packager->short_description("This is a short description.");
 my $description = $packager->short_description();
 

The short description is just that a short description of the program. It must be all on one line.

description()

 $packager->description("This is the description.");
 my $description = $packager->description();
 

The description method sets the package description to the passed value. If no arguments are passed the package description is returned.

The discription can be of any length. It will be formatted by RPM in the following way:

  • If a line starts with a space it will be printed verbatim.

  • A blank line signifies a new paragraph.

  • All other lines will be assumed to be part of a paragraph and will be formatted by RPM.

package()

This method creates the package and returns true if it is successful else it returns undef

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 353:

'=item' outside of any '=over'

Around line 371:

You forgot a '=back' before '=head2'