=encoding utf8
=head1 NAME
Module::Optimize - Perl Module Optimization
=head1 SYNOPSIS
package Foo;
use Module::Optimize -base;
sub pmc_optimize {
my ($self, $source) = @_;
# Convert perl5 $source into semantically equivalent $compiled_output
return $compiled_output;
}
In F<Bar.pm>:
package Bar;
use Foo;
or lexically:
package Bar;
{
use Foo;
...
}
To compile F<Bar.pm> into F<Bar.pmc>:
perl -c Bar.pm
=head1 DESCRIPTION
This module provides a system for writing modules that I<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
C<.pmc> files.
Perl has native support for C<.pmc> files. It always checks for them, before
loading a C<.pm> file.
You get the following benefits:
=head1 SEE ALSO
Module::Compile
=head1 AUTHOR
Audrey Tang <autrijus@autrijus.org>
=head1 COPYRIGHT AND LICENSE
Copyright (c) 2006, 2011. Audrey Tang.
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
=cut