CGI::AppBuilder::Frame

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

CGI::AppBuilder::Frame Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Hanming Tu
  • Publisher web site:
  • http://search.cpan.org/~geotiger/File-Xcopy-0.12/Xcopy.pm

CGI::AppBuilder::Frame Tags


CGI::AppBuilder::Frame Description

CGI::AppBuilder::Frame is 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 - 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 messageHow to use:The following shows how to define the frame array ($fr): +-+----+ The following defines the left layout: | | T | | +----+ ]] +-+----+ ]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 | | +----+-+ ] ], | | 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 = ]] ]; 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 = ], {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 >.Requirements:· Perl Requirements: · Perl


CGI::AppBuilder::Frame Related Software