Crypt::License is a Perl extension to examine a license file.
USAGE
There are two modes of operation:
use Crypt::License;1;
__END__
encrypted module here...
The calling routine should define an anonymous hash pointed to by the variable $ptr2_License. i.e.
use vars qw( $ptr2_License );
$ptr2_License = {
'private' => 'name1, name2,...', # use private key
# module name
'path' => 'path to License file',
};
require licensed_module_name;
Or, for nested modules, a reference pointer to point back to the originating module containing the License information.
use vars qw( $ptr2_License );
$ptr2_License = { 'next' => 'any value will do', };
require licensed_module_name;
Seconds remaining until License expiration are returned in
$ptr2_License{expires} unless there is no expiration
Warnings if any will be in $ptr2_License->{warn}
It is important the 'require' instead of 'use' loads the module
so that $ptr2_License is visible to the loader and not forgotton
in the case of mod-perl so don't enclose a in BEGIN{} block.
Version checking is not supported via 'use' like statement. It
can be done by examining the module contents.
More automated setup can be accomplished with the Crypt::License::Util tools.
use Crypt::License::Util;
See Crypt::License::Util documentation for complete description
The second module mode is for development use and just loads the module so its objects can be accessed;
use Crypt::License;
$time = Crypt::License::date2time(date string);
@file_text = Crypt::License::get_file(file_path);
$first_tag_number = Crypt::License::extract(@file_text,%parms);
Crypt::License::get_vals(%parms);
Product's homepage
Requirements:
· Perl