Extending Perl classes and methods
The following are some considerations when extending Perl classes and methods.
- In each Perl package/class file, SDL includes a statement such as the following:
eval {require "PCMcommand_ext.pm";};
- If needed, ProServe can create an override file in the directory in which the Perl API packages are delivered.
- The file must be named the same as the package that is being overridden, followed by
_ext.pm. - Do NOT include a package name in the file.
- Subroutines defined in the file must follow the example of the subroutines in the delivered class/package.
- The file must be named the same as the package that is being overridden, followed by
- SDL provides an example file: PCMcommand_ext.pm.example, which contains some basic instructions and an example subroutine.