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

    CGI::AppBuilder::Frame 0.10

    Download button

    No screenshots available
    Downloads: 367  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Hanming Tu | More programs
    Perl Artistic License / FREE
    October 26th, 2010, 08:23 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    CGI::AppBuilder::Frame description

    A configuration initializer.

    CGI::AppBuilder::Frame is a configuration initializer.

    SYNOPSIS

    use CGI::AppBuilder::Frame;

    my $ab = CGI::AppBuilder::Frame- >new(
    'ifn', 'my_init.cfg', 'opt', 'vhS:a:');
    my ($q, $ar, $ar_log) = $ab- >start_app($0, %ARGV);
    print $ab- >disp_form($q, $ar);

    This class provides methods for reading and parsing configuration files.
    new (ifn = > 'file.cfg', opt = > 'hvS:')

    This is a inherited method from CGI::AppBuilder. See the same method in CGI::AppBuilder for more details.

    frame_set ($fr, $pr)

    Input variables:

    $fr - frame set definiton array reference. The $fr contains two
    elements [$hr, $ar]:
    $hr - a hash ref containing the frame set attributes
    $ar - a array ref containing hash references defining each
    frames in the frame set.
    $pr - tag attribute array ref. It contains three elements:
    class - CSS class name
    attr - attribute string such as 'width=5 onChange=js_func'
    hr - hash ref with key and value pairs. This will be obtained
    from $fr for each frame set and frame.
    pretty - whether to add line breaks

    Variables used or methods called:

    CGI::AppBuilder::Table
    html_tag - generate HTML tags
    CGI::AppBuilder::Message
    echo_msg - display message

    How to use:

    The following shows how to define the frame array ($fr):

    +-+----+ The following defines the left layout:
    | | T |
    | +----+ [{cols= >"150,*"},[
    | | | {src= >"left.htm",name= >"L"},
    |L| C | [{rows= >"100,*,50"},[
    | | | {src= >"top.htm",name= >"T"},
    | |----| {src= >"main.htm",name= >"C"},
    | | B | {src= >"bottom.htm",name= >"B"}]]]
    +-+----+ ]

    In YAML, here is how it looks like:

    ---
    cols: 150,*
    - src: left.htm
    name: L
    - rows: 100,*,50
    - src: top.htm
    name: T
    - src: main.htm
    name: C
    - src: bottom.htm
    name: B
    ...

    +-+------+ The following defines the left layout:
    | | T |
    | +----+-+ [{cols= >"150,*"},[
    | | | | {src= >"left.htm",name= >"L"},
    |L| C |R| [{rows= >"100,*,50"},[
    | | | | {src= >"top.htm",name= >"T"},
    | | | | [{cols= >"*,100"},[
    | |----+-+ {src= >"main.htm",name= >"C"},
    | | | {src= >"right.htm",name= >"R"}] ] ],
    | | B | {src= >"bottom.htm",name= >"B"}]]
    +-+----+-+ ]
    In YAML, here is how it looks like:
    ---
    cols: 150,*
    - src: left.htm
    name: L
    - rows: 100,*,50
    - src: top.htm
    name: T
    - cols: *,100
    - src: main.htm
    name: C
    - src: right.htm
    name: R
    - src: bottom.htm
    name: B
    ...
    Here is the testing codes:
    my $fr = [{cols= >"150,*"},[
    {src= >"left.htm",name= >"L"},
    [{rows= >"100,*,50"},[
    {src= >"top.htm",name= >"T"},
    {src= >"main.htm",name= >"C"},
    {src= >"bottom.htm",name= >"B"}]
    ]]
    ];
    my $pr = {pretty= >1};
    print $obj- >frame_set($fr,$pr);
    # the following is the result:

    < FRAMESET cols='150,*' >
    < FRAME src='left.htm' name='L' >
    < FRAMESET rows='100,*,50' >
    < FRAME src='top.htm' name='T' >
    < FRAME src='main.htm' name='C' >
    < FRAME src='bottom.htm' name='B' >
    < / FRAMESET >
    < / FRAMESET >

    $pr- >{_frameset_count} = 0; # reset frame set counter
    my $f2 = [ {cols= >"150,*"},[
    {src= >"left.htm",name= >"L"},
    [{rows= >"100,*,50"},[
    {src= >"top.htm",name= >"T"},
    [{cols= >"*,100"},[
    {src= >"main.htm",name= >"C"},
    {src= >"right.htm",name= >"R"}]
    ],
    {src= >"bottom.htm",name= >"B"}]
    ]]
    ];
    print $obj- >frame_set($f2,$pr);
    # the following is the result:

    < FRAMESET cols='150,*' >
    < FRAME src='left.htm' name='L' >
    < FRAMESET rows='100,*,50' >
    < FRAME src='top.htm' name='T' >
    < FRAMESET cols='*,100' >
    < FRAME src='main.htm' name='C' >
    < FRAME src='right.htm' name='R' >
    < / FRAMESET >
    < FRAME src='bottom.htm' name='B' >
    < / FRAMESET >
    < / FRAMESET >


    Return: HTML codes.

    This method generates HTML codes based on the information provided. This method is also called < I >frameset< / I >.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    configuration initializer | CGI::AppBuilder frame | Perl module | CGI::AppBuilder | configuration | initializer

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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