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.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    CGI::Portable::AppSplitScreen 0.51

    Download button

    No screenshots available
    Downloads: 417  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.5/5)
    15 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Darren R. Duncan | More programs
    Perl Artistic License / FREE
    April 9th, 2008, 15:08 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    CGI::Portable::AppSplitScreen description

    A Perl module which allows delegate construction of a screen between several modules

    CGI::Portable::AppSplitScreen is a Perl module which allows delegate construction of a screen between several modules.

    SYNOPSIS

    Simple program whose output is made by combining several modules:

    #!/usr/bin/perl
    use strict;
    use warnings;

    require CGI::Portable;
    my $globals = CGI::Portable->new();

    use Cwd;
    $globals->file_path_root( cwd() ); # let us default to current working dir
    $globals->file_path_delimiter( $^O=~/Mac/i ? ":" : $^O=~/Win/i ? "\" : "/" );

    require CGI::Portable::AdapterCGI;
    my $io = CGI::Portable::AdapterCGI->new();
    $io->fetch_user_input( $globals );

    $globals->default_application_title( 'Demo Application' );
    $globals->default_maintainer_name( 'Tony Simons' );
    $globals->default_maintainer_email_address( 'tony@aardvark.net' );

    $globals->current_user_path_level( 1 );
    $globals->set_prefs( 'myconfig.pl' );
    $globals->call_component( 'CGI::Portable::AppSplitScreen' );

    $io->send_user_output( $globals );

    1;

    Content of file 'myconfig.pl' telling program what to do:

    This is not a whole example, but you can get an idea what to substitute. This example shows 3 screen regions handled by 3 module instances, each of which has their own preferences and optional subdirectory for files.

    my $rh_preferences = {
    delegate_list => [
    {
    file_subdir => 'menus',
    preferences => { key => 'value' },
    module_name => 'other::module::menu',
    leave_scalars => 1,
    replace_lists => 0,
    },
    {
    file_subdir => 'forms',
    preferences => { key1 => 'value', key2 => 'value' },
    module_name => 'other::module::form',
    leave_scalars => 0,
    replace_lists => 0,
    },
    {
    file_subdir => undef,
    preferences => {},
    module_name => 'other::module::disclaim',
    leave_scalars => 1,
    replace_lists => 0,
    },
    ],
    };


    This Perl 5 object class is a simple encapsulated application, or "component", that runs in the CGI::Portable environment. It allows you to easily divide a response screen into multiple regions and then delegate the construction of each region to separate "components".

    You define the regions within the standard "preferences", and no other input is required. Specifically, you use the "delegate_list" array preference; each array element describes a region, and the created regions appear consecutively in the same order as in the array. Each element says what delegate module to call and what its preferences are.

    This class is subclassed from CGI::Portable::AppStatic, which is convenient if you want to do simple post-processing of your new screen using its preferences. This module is designed to be easily subclassed by your own application components, should you wish to extend or customize its functionality.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    delegate construction | screen contrsuction | Perl module | delegate | construction | screen

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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