persona is a Perl module born out of the need to be able to easily specify which subroutines of a module should be available (as in "compiled") in different sets of mod_perl environments (e.g. the visitors front end web servers, or the personnel's back-office web servers). This both from a memory, database and CPU usage point of view, as well as from the viewpoint of security.
This is most useful when using a database abstraction layer such as Class::DBI or DBIx::Class, where all of the code pertaining to an object is located in one file, while only parts of the code are actually needed (or wanted) on specific execution contexts.
SYNOPSIS
$ PERSONA=cron perl foo.pl
foo.pl
=================
use persona only_for => '*'; # all modules, maybe regex
use Foo;
Foo.pm
=================
package Foo;
# code to be compiled always
#PERSONA cron || app || book
# code to be compiled only for the "cron", "app" and "book" personas
#PERSONA
# code to be compiled always
#PERSONA !cron
# code to be compiled for all personas except "cron"
#PERSONA !( app || book )
# code to be compiled for all personas except "app" and "book"
my $limit = PERSONA eq 'app' ? 100 : 10; # code using the constant
Product's homepage
Requirements:
· Perl