Module::Optimize - Perl Module Optimization
package Foo; use Module::Optimize -base; sub pmc_optimize { my ($self, $source) = @_; # Convert perl5 $source into semantically equivalent $compiled_output return $compiled_output; }
In Bar.pm:
Bar.pm
package Bar; use Foo;
or lexically:
package Bar; { use Foo; ... }
To compile Bar.pm into Bar.pmc:
Bar.pmc
perl -c Bar.pm
This module provides a system for writing modules that compile other Perl modules.
Modules that use these compilation modules get compiled into some altered form the first time they are run. The result is cached into .pmc files.
.pmc
Perl has native support for .pmc files. It always checks for them, before loading a .pm file.
.pm
You get the following benefits:
Module::Compile
Ingy döt Net <ingy@cpan.org>
Audrey Tang <audreyt@audreyt.org>
Copyright 2006-2014. Ingy döt Net.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install Module::Compile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Module::Compile
CPAN shell
perl -MCPAN -e shell install Module::Compile
For more information on module installation, please visit the detailed CPAN module installation guide.