Basic Sample Module
The package should be "cPanel::Category::Name"; (underscores are allowed and are displayed as spaces whenever appropriate)
Generally, none of the functions should be edited except as noted in the rest of the documentation
The only two required keys of the $meta_info hash ref are used below:
package cPanel::CMS::Foo;
# always use these modules here:
use strict;
use warnings;
our $VERSION = '0.0.1'; # version of Foo.pm *not* the addon script's version
my $pkg = __PACKAGE__; # leave this as is
our $meta_info =
{ # see "$meta_info hash reference table" for details about this hashref
'version' => '1.0',
'description' => 'Foo is a tool to do Bar and Baz',
};
#### action functions ##
sub install {
shift => stdinstall(@_);
}
sub upgrade {
shift => stdupgrade(@_);
}
sub uninstall {
shift => stduninstall(@_);
}
#### non action functions ##
sub installform {
print shift => {installform};
}
sub upgradeform {
print shift => {upgradeform};
}
sub uninstallform {
print shift => {uninstallform};
}
#### addon specific special functions ##
1;
Topic revision: r8 - 12 May 2011 - 20:48:13 - Main.JustinSchaefer
CpanelAddons.BasicSample moved from Sandbox.BasicSample on 18 May 2009 - 18:10 by Main.JustinSchaefer