NAME

Game::Asset::PerlModule - A game asset that's a Perl module

DESCRIPTION

Handles an asset that's a Perl module.

The code in the module is loaded up much like any other Perl module. As with any other Perl module, you should trust the source of the code being loaded.

WRITING THE MODULE

For the most part, you would write the module code the same as any other module. There is only one small change: instead of having 1; as your last line to return a true value, you should have __PACKAGE__;. Game::Asset::PerlModule uses this to get the package name of the module.

While it is possible to load multiple packages into a single file, it's recommended to avoid this within Game::Asset::PerlModule.

METHODS

package

Returns the name of the package that was loaded.