Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    persona 0.10

    Download button

    No screenshots available
    Downloads: 155  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Elizabeth Mattijsen | More programs
    Perl Artistic License / FREE
    December 4th, 2010, 16:56 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    persona description

    Control which code will be loaded for an execution context

    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

      


    TAGS:

    execution context | Perl module | Perl | execution | context

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM